config dump
This commit is contained in:
parent
72b07bd11f
commit
25483702ac
9 changed files with 1416 additions and 208 deletions
560
config.kdl
560
config.kdl
|
@ -1,31 +1,26 @@
|
|||
input {
|
||||
keyboard {
|
||||
xkb {
|
||||
layout "gb,ru,de,us"
|
||||
variant ",phonetic_winkeys,,dvorak"
|
||||
options "grp:rctrl_rshift_toggle,,caps:escape, "
|
||||
// compose:ralt
|
||||
// compose:102
|
||||
layout "us,ru"
|
||||
variant ",phonetic_winkeys"
|
||||
options "grp:rctrl_rshift_toggle, compose:102"
|
||||
}
|
||||
repeat-rate 60
|
||||
repeat-delay 200
|
||||
repeat-rate 60
|
||||
repeat-delay 200
|
||||
numlock
|
||||
}
|
||||
|
||||
touchpad {
|
||||
tap
|
||||
}
|
||||
|
||||
// focus-follows-mouse max-scroll-amount="0%"
|
||||
focus-follows-mouse
|
||||
// focus-follows-mouse
|
||||
focus-follows-mouse max-scroll-amount="0%"
|
||||
}
|
||||
|
||||
// Laptop
|
||||
output "eDP-1" {
|
||||
mode "1920x1080@59.999"
|
||||
scale 1
|
||||
position x=0 y=0
|
||||
}
|
||||
|
||||
// PC
|
||||
output "DP-2" {
|
||||
mode "1920x1080@59.999"
|
||||
|
@ -37,249 +32,398 @@ output "HDMI-A-1" {
|
|||
scale 1
|
||||
position x=1920 y=0
|
||||
}
|
||||
|
||||
layout {
|
||||
gaps 8
|
||||
|
||||
gaps 0
|
||||
center-focused-column "on-overflow"
|
||||
|
||||
focus-ring {
|
||||
width 2
|
||||
active-color "#f9e2af"
|
||||
inactive-color "transparent"
|
||||
active-gradient from="#E5989B" to="#FFB4A2" angle=45 relative-to="workspace-view" in="oklch longer hue"
|
||||
}
|
||||
border {
|
||||
width 1
|
||||
active-color "#000"
|
||||
inactive-color "#000"
|
||||
}
|
||||
tab-indicator {
|
||||
width 2
|
||||
gap 4
|
||||
gaps-between-tabs 2
|
||||
}
|
||||
shadow {
|
||||
on
|
||||
}
|
||||
insert-hint {
|
||||
color "#ffc87f80"
|
||||
gradient from="#f38ba880" to="#f9e2af80" angle=45 relative-to="workspace-view"
|
||||
}
|
||||
preset-column-widths {
|
||||
proportion 0.33333
|
||||
proportion 0.5
|
||||
proportion 0.66667
|
||||
proportion 0.33333
|
||||
}
|
||||
|
||||
default-column-width { proportion 0.5; }
|
||||
|
||||
focus-ring {
|
||||
off
|
||||
}
|
||||
|
||||
border {
|
||||
width 4
|
||||
active-color "ffc87f"
|
||||
inactive-color "#505050"
|
||||
default-column-width {
|
||||
proportion 0.5
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// xwayland stuff
|
||||
spawn-at-startup "xwayland-satellite"
|
||||
spawn-at-startup "avizo-service"
|
||||
spawn-at-startup "keepassxc"
|
||||
spawn-at-startup "startxfce4"
|
||||
|
||||
|
||||
spawn-at-startup "bash" "-c" "quickshell --path ~/repos/projects/nichts/modules/style/quickshell/shell"
|
||||
spawn-at-startup "swww-daemon"
|
||||
spawn-at-startup "swww-daemon" "--namespace" "overview"
|
||||
environment {
|
||||
DISPLAY ":0"
|
||||
}
|
||||
|
||||
layer-rule {
|
||||
match namespace="overview$"
|
||||
place-within-backdrop true
|
||||
}
|
||||
// prefer no client side decorations
|
||||
prefer-no-csd
|
||||
|
||||
// no saving screenshots
|
||||
screenshot-path null
|
||||
|
||||
|
||||
switch-events {
|
||||
lid-close { spawn "swaylock"; }
|
||||
lid-close {
|
||||
spawn "swaylock"
|
||||
}
|
||||
}
|
||||
overview {
|
||||
zoom 0.65
|
||||
backdrop-color "#777777"
|
||||
}
|
||||
|
||||
|
||||
workspace "main"
|
||||
workspace "scratch"
|
||||
workspace "browser"
|
||||
workspace "social"
|
||||
workspace "keepass"
|
||||
workspace "keepassxc"
|
||||
workspace "infra"
|
||||
workspace "multimedia"
|
||||
|
||||
animations {
|
||||
off
|
||||
slowdown 1.0
|
||||
// off
|
||||
|
||||
window-open {
|
||||
// duration-ms 1250
|
||||
// curve "linear"
|
||||
|
||||
custom-shader r"
|
||||
vec4 open_color(vec3 coords_geo, vec3 size_geo) {
|
||||
// Get color from the window texture.
|
||||
vec3 coords_tex = niri_geo_to_tex * coords_geo;
|
||||
vec4 color = texture2D(niri_tex, coords_tex.st);
|
||||
|
||||
vec2 coords = (coords_geo.xy - vec2(0.5, 0.5)) * size_geo.xy * 2.0;
|
||||
coords = coords / length(size_geo.xy);
|
||||
float p = niri_clamped_progress;
|
||||
if (p * p <= dot(coords, coords))
|
||||
color = vec4(0.0);
|
||||
|
||||
return color;
|
||||
}
|
||||
"
|
||||
}
|
||||
workspace-switch {
|
||||
spring damping-ratio=1.0 stiffness=1000 epsilon=0.0001
|
||||
}
|
||||
}
|
||||
|
||||
// Open the Firefox picture-in-picture player as floating by default.
|
||||
window-rule {
|
||||
match app-id=r#"librewolf$"# title="^Picture-in-Picture$"
|
||||
match app-id="librewolf$" title="^Picture-in-Picture$"
|
||||
open-floating true
|
||||
open-on-workspace "browser"
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
|
||||
match app-id="org.keepassxc.KeePassXC"
|
||||
block-out-from "screen-capture"
|
||||
open-on-workspace "keepass"
|
||||
open-on-workspace "keepassxc"
|
||||
}
|
||||
|
||||
hotkey-overlay {
|
||||
skip-at-startup
|
||||
}
|
||||
|
||||
cursor {
|
||||
xcursor-theme "BreezeX-RosePine-Linux"
|
||||
xcursor-size 32
|
||||
|
||||
hide-when-typing
|
||||
}
|
||||
|
||||
binds {
|
||||
Mod+Shift+Slash { show-hotkey-overlay; }
|
||||
|
||||
Mod+Return { spawn "foot"; }
|
||||
Mod+D { spawn "fuzzel"; }
|
||||
Super+Alt+L { spawn "swaylock"; }
|
||||
|
||||
Mod+Shift+Slash {
|
||||
show-hotkey-overlay
|
||||
}
|
||||
// Mod+Return {
|
||||
// spawn "foot"
|
||||
// }
|
||||
Mod+Return {
|
||||
spawn "ghostty"
|
||||
}
|
||||
Mod+D {
|
||||
spawn "bash" "-c" "quickshell --path ~/repos/projects/nichts/modules/style/quickshell/shell msg launcher open"
|
||||
}
|
||||
Mod+Alt+L {
|
||||
spawn "swaylock"
|
||||
}
|
||||
// Audio
|
||||
XF86AudioRaiseVolume allow-when-locked=true { spawn "volumectl" "-u" "up"; }
|
||||
XF86AudioLowerVolume allow-when-locked=true { spawn "volumectl" "-u" "down"; }
|
||||
XF86AudioMute allow-when-locked=true { spawn "volumectl" "toggle-mute"; }
|
||||
XF86AudioMicMute allow-when-locked=true { spawn "volumectl" "-m" "toggle-mute"; }
|
||||
|
||||
XF86AudioPlay allow-when-locked=true { spawn "playerctl" "play-pause"; }
|
||||
XF86AudioNext allow-when-locked=true { spawn "playerctl" "next"; }
|
||||
XF86AudioPrev allow-when-locked=true { spawn "playerctl" "previous"; }
|
||||
|
||||
XF86AudioRaiseVolume allow-when-locked=true {
|
||||
spawn "volumectl" "-u" "up"
|
||||
}
|
||||
XF86AudioLowerVolume allow-when-locked=true {
|
||||
spawn "volumectl" "-u" "down"
|
||||
}
|
||||
XF86AudioMute allow-when-locked=true {
|
||||
spawn "volumectl" "toggle-mute"
|
||||
}
|
||||
XF86AudioMicMute allow-when-locked=true {
|
||||
spawn "volumectl" "-m" "toggle-mute"
|
||||
}
|
||||
XF86AudioPlay allow-when-locked=true {
|
||||
spawn "playerctl" "play-pause"
|
||||
}
|
||||
XF86AudioNext allow-when-locked=true {
|
||||
spawn "playerctl" "next"
|
||||
}
|
||||
XF86AudioPrev allow-when-locked=true {
|
||||
spawn "playerctl" "previous"
|
||||
}
|
||||
// Monitor brightness
|
||||
XF86MonBrightnessUp allow-when-locked=true { spawn "lightctl" "up"; }
|
||||
XF86MonBrightnessDown allow-when-locked=true { spawn "lightctl" "down"; }
|
||||
|
||||
Mod+Q { close-window; }
|
||||
|
||||
Mod+H { focus-column-left; }
|
||||
Mod+J { focus-window-or-workspace-down; }
|
||||
Mod+K { focus-window-or-workspace-up; }
|
||||
Mod+L { focus-column-right; }
|
||||
|
||||
Mod+Shift+H { move-column-left; }
|
||||
Mod+Shift+J { move-window-down-or-to-workspace-down; }
|
||||
Mod+Shift+K { move-window-up-or-to-workspace-up; }
|
||||
Mod+Shift+L { move-column-right; }
|
||||
|
||||
Mod+Home { focus-column-first; }
|
||||
Mod+End { focus-column-last; }
|
||||
Mod+Ctrl+Home { move-column-to-first; }
|
||||
Mod+Ctrl+End { move-column-to-last; }
|
||||
|
||||
Mod+Ctrl+H { focus-monitor-left; }
|
||||
Mod+Ctrl+J { focus-monitor-down; }
|
||||
Mod+Ctrl+K { focus-monitor-up; }
|
||||
Mod+Ctrl+L { focus-monitor-right; }
|
||||
|
||||
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
|
||||
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
|
||||
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
|
||||
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
|
||||
|
||||
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
|
||||
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
|
||||
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
|
||||
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
|
||||
|
||||
|
||||
Mod+Page_Down { focus-workspace-down; }
|
||||
Mod+Page_Up { focus-workspace-up; }
|
||||
Mod+Shift+Page_Down { move-column-to-workspace-down; }
|
||||
Mod+Shift+Page_Up { move-column-to-workspace-up; }
|
||||
|
||||
Mod+U { focus-workspace-down; }
|
||||
Mod+I { focus-workspace-up; }
|
||||
Mod+Shift+U { move-column-to-workspace-down; }
|
||||
Mod+Shift+I { move-column-to-workspace-up; }
|
||||
|
||||
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
|
||||
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
|
||||
Mod+Shift+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
|
||||
Mod+Shift+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
|
||||
|
||||
Mod+WheelScrollRight { focus-column-right; }
|
||||
Mod+WheelScrollLeft { focus-column-left; }
|
||||
Mod+Shift+WheelScrollRight { move-column-right; }
|
||||
Mod+Shift+WheelScrollLeft { move-column-left; }
|
||||
|
||||
Mod+1 { focus-workspace 1; }
|
||||
Mod+2 { focus-workspace 2; }
|
||||
Mod+3 { focus-workspace 3; }
|
||||
Mod+4 { focus-workspace 4; }
|
||||
Mod+5 { focus-workspace 5; }
|
||||
Mod+6 { focus-workspace 6; }
|
||||
Mod+7 { focus-workspace 7; }
|
||||
Mod+8 { focus-workspace 8; }
|
||||
Mod+9 { focus-workspace 9; }
|
||||
|
||||
Mod+Shift+1 { move-column-to-workspace 1; }
|
||||
Mod+Shift+2 { move-column-to-workspace 2; }
|
||||
Mod+Shift+3 { move-column-to-workspace 3; }
|
||||
Mod+Shift+4 { move-column-to-workspace 4; }
|
||||
Mod+Shift+5 { move-column-to-workspace 5; }
|
||||
Mod+Shift+6 { move-column-to-workspace 6; }
|
||||
Mod+Shift+7 { move-column-to-workspace 7; }
|
||||
Mod+Shift+8 { move-column-to-workspace 8; }
|
||||
Mod+Shift+9 { move-column-to-workspace 9; }
|
||||
|
||||
|
||||
Mod+BracketLeft { consume-or-expel-window-left; }
|
||||
Mod+BracketRight { consume-or-expel-window-right; }
|
||||
|
||||
Mod+Comma { consume-window-into-column; }
|
||||
Mod+Period { expel-window-from-column; }
|
||||
|
||||
Mod+R { switch-preset-column-width; }
|
||||
Mod+Shift+R { switch-preset-window-height; }
|
||||
Mod+Ctrl+R { reset-window-height; }
|
||||
Mod+F { maximize-column; }
|
||||
Mod+Shift+F { fullscreen-window; }
|
||||
|
||||
Mod+Ctrl+F { expand-column-to-available-width; }
|
||||
|
||||
Mod+C { center-column; }
|
||||
|
||||
Mod+A {spawn "niri-switch-to-workspace"; }
|
||||
|
||||
Mod+Minus { set-column-width "-10%"; }
|
||||
Mod+Equal { set-column-width "+10%"; }
|
||||
|
||||
XF86MonBrightnessUp allow-when-locked=true {
|
||||
spawn "lightctl" "up"
|
||||
}
|
||||
XF86MonBrightnessDown allow-when-locked=true {
|
||||
spawn "lightctl" "down"
|
||||
}
|
||||
Mod+Q {
|
||||
close-window
|
||||
}
|
||||
Mod+H {
|
||||
focus-column-or-monitor-left
|
||||
}
|
||||
Mod+J {
|
||||
focus-window-or-workspace-down
|
||||
}
|
||||
Mod+K {
|
||||
focus-window-or-workspace-up
|
||||
}
|
||||
Mod+L {
|
||||
focus-column-or-monitor-right
|
||||
}
|
||||
Mod+Shift+H {
|
||||
move-column-left-or-to-monitor-left
|
||||
}
|
||||
Mod+Shift+J {
|
||||
move-window-down-or-to-workspace-down
|
||||
}
|
||||
Mod+Shift+K {
|
||||
move-window-up-or-to-workspace-up
|
||||
}
|
||||
Mod+Shift+L {
|
||||
move-column-right-or-to-monitor-right
|
||||
}
|
||||
Mod+Home {
|
||||
focus-column-first
|
||||
}
|
||||
Mod+End {
|
||||
focus-column-last
|
||||
}
|
||||
Mod+Ctrl+Home {
|
||||
move-column-to-first
|
||||
}
|
||||
Mod+Ctrl+End {
|
||||
move-column-to-last
|
||||
}
|
||||
Mod+Ctrl+H {
|
||||
focus-monitor-left
|
||||
}
|
||||
Mod+Ctrl+J {
|
||||
focus-monitor-down
|
||||
}
|
||||
Mod+Ctrl+K {
|
||||
focus-monitor-up
|
||||
}
|
||||
Mod+Ctrl+L {
|
||||
focus-monitor-right
|
||||
}
|
||||
Mod+Shift+Ctrl+Left {
|
||||
move-column-to-monitor-left
|
||||
}
|
||||
Mod+Shift+Ctrl+Down {
|
||||
move-column-to-monitor-down
|
||||
}
|
||||
Mod+Shift+Ctrl+Up {
|
||||
move-column-to-monitor-up
|
||||
}
|
||||
Mod+Shift+Ctrl+Right {
|
||||
move-column-to-monitor-right
|
||||
}
|
||||
Mod+Shift+Ctrl+H {
|
||||
move-column-to-monitor-left
|
||||
}
|
||||
Mod+Shift+Ctrl+J {
|
||||
move-column-to-monitor-down
|
||||
}
|
||||
Mod+Shift+Ctrl+K {
|
||||
move-column-to-monitor-up
|
||||
}
|
||||
Mod+Shift+Ctrl+L {
|
||||
move-column-to-monitor-right
|
||||
}
|
||||
Mod+Page_Down {
|
||||
focus-workspace-down
|
||||
}
|
||||
Mod+Page_Up {
|
||||
focus-workspace-up
|
||||
}
|
||||
Mod+Shift+Page_Down {
|
||||
move-column-to-workspace-down
|
||||
}
|
||||
Mod+Shift+Page_Up {
|
||||
move-column-to-workspace-up
|
||||
}
|
||||
Mod+U {
|
||||
focus-workspace-down
|
||||
}
|
||||
Mod+I {
|
||||
focus-workspace-up
|
||||
}
|
||||
Mod+Shift+U {
|
||||
move-column-to-workspace-down
|
||||
}
|
||||
Mod+Shift+I {
|
||||
move-column-to-workspace-up
|
||||
}
|
||||
Mod+WheelScrollDown cooldown-ms=150 {
|
||||
focus-workspace-down
|
||||
}
|
||||
Mod+WheelScrollUp cooldown-ms=150 {
|
||||
focus-workspace-up
|
||||
}
|
||||
Mod+Shift+WheelScrollDown cooldown-ms=150 {
|
||||
move-column-to-workspace-down
|
||||
}
|
||||
Mod+Shift+WheelScrollUp cooldown-ms=150 {
|
||||
move-column-to-workspace-up
|
||||
}
|
||||
Mod+WheelScrollRight {
|
||||
focus-column-right
|
||||
}
|
||||
Mod+WheelScrollLeft {
|
||||
focus-column-left
|
||||
}
|
||||
Mod+Shift+WheelScrollRight {
|
||||
move-column-right
|
||||
}
|
||||
Mod+Shift+WheelScrollLeft {
|
||||
move-column-left
|
||||
}
|
||||
Mod+1 {
|
||||
focus-workspace 1
|
||||
}
|
||||
Mod+2 {
|
||||
focus-workspace 2
|
||||
}
|
||||
Mod+3 {
|
||||
focus-workspace 3
|
||||
}
|
||||
Mod+4 {
|
||||
focus-workspace 4
|
||||
}
|
||||
Mod+5 {
|
||||
focus-workspace 5
|
||||
}
|
||||
Mod+6 {
|
||||
focus-workspace 6
|
||||
}
|
||||
Mod+7 {
|
||||
focus-workspace 7
|
||||
}
|
||||
Mod+8 {
|
||||
focus-workspace 8
|
||||
}
|
||||
Mod+9 {
|
||||
focus-workspace 9
|
||||
}
|
||||
Mod+Shift+1 {
|
||||
move-column-to-workspace 1
|
||||
}
|
||||
Mod+Shift+2 {
|
||||
move-column-to-workspace 2
|
||||
}
|
||||
Mod+Shift+3 {
|
||||
move-column-to-workspace 3
|
||||
}
|
||||
Mod+Shift+4 {
|
||||
move-column-to-workspace 4
|
||||
}
|
||||
Mod+Shift+5 {
|
||||
move-column-to-workspace 5
|
||||
}
|
||||
Mod+Shift+6 {
|
||||
move-column-to-workspace 6
|
||||
}
|
||||
Mod+Shift+7 {
|
||||
move-column-to-workspace 7
|
||||
}
|
||||
Mod+Shift+8 {
|
||||
move-column-to-workspace 8
|
||||
}
|
||||
Mod+Shift+9 {
|
||||
move-column-to-workspace 9
|
||||
}
|
||||
Mod+BracketLeft {
|
||||
consume-or-expel-window-left
|
||||
}
|
||||
Mod+BracketRight {
|
||||
consume-or-expel-window-right
|
||||
}
|
||||
Mod+Comma {
|
||||
consume-window-into-column
|
||||
}
|
||||
Mod+Period {
|
||||
expel-window-from-column
|
||||
}
|
||||
Mod+R {
|
||||
switch-preset-column-width
|
||||
}
|
||||
Mod+Shift+R {
|
||||
switch-preset-window-height
|
||||
}
|
||||
Mod+Ctrl+R {
|
||||
reset-window-height
|
||||
}
|
||||
Mod+F {
|
||||
maximize-column
|
||||
}
|
||||
Mod+Shift+F {
|
||||
fullscreen-window
|
||||
}
|
||||
Mod+Ctrl+F {
|
||||
expand-column-to-available-width
|
||||
}
|
||||
Mod+C {
|
||||
center-column
|
||||
}
|
||||
Mod+X {
|
||||
focus-workspace "keepassxc"
|
||||
}
|
||||
Mod+Minus {
|
||||
set-column-width "-10%"
|
||||
}
|
||||
Mod+Equal {
|
||||
set-column-width "+10%"
|
||||
}
|
||||
// Finer height adjustments when in column with other windows.
|
||||
Mod+Shift+Minus { set-window-height "-10%"; }
|
||||
Mod+Shift+Equal { set-window-height "+10%"; }
|
||||
|
||||
Mod+Shift+Minus {
|
||||
set-window-height "-10%"
|
||||
}
|
||||
Mod+Shift+Equal {
|
||||
set-window-height "+10%"
|
||||
}
|
||||
// Move the focused window between the floating and the tiling layout.
|
||||
Mod+V { toggle-window-floating; }
|
||||
Mod+Shift+V { switch-focus-between-floating-and-tiling; }
|
||||
|
||||
Mod+W { toggle-column-tabbed-display; }
|
||||
|
||||
Print { screenshot; }
|
||||
Ctrl+Print { screenshot-screen; }
|
||||
Alt+Print { screenshot-window; }
|
||||
|
||||
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
|
||||
|
||||
Mod+Shift+E { quit; }
|
||||
|
||||
Mod+Shift+P { power-off-monitors; }
|
||||
Mod+V {
|
||||
toggle-window-floating
|
||||
}
|
||||
Mod+Shift+V {
|
||||
switch-focus-between-floating-and-tiling
|
||||
}
|
||||
Mod+W {
|
||||
toggle-column-tabbed-display
|
||||
}
|
||||
Mod+O {
|
||||
toggle-overview
|
||||
}
|
||||
Print {
|
||||
screenshot
|
||||
}
|
||||
Ctrl+Print {
|
||||
screenshot-screen
|
||||
}
|
||||
Alt+Print {
|
||||
screenshot
|
||||
}
|
||||
Mod+Escape allow-inhibiting=false {
|
||||
toggle-keyboard-shortcuts-inhibit
|
||||
}
|
||||
Mod+Shift+E {
|
||||
quit
|
||||
}
|
||||
Mod+Shift+P {
|
||||
power-off-monitors
|
||||
}
|
||||
}
|
||||
|
||||
|
|
69
helix-config.toml
Normal file
69
helix-config.toml
Normal file
|
@ -0,0 +1,69 @@
|
|||
theme = "theme_transparent"
|
||||
|
||||
[editor]
|
||||
auto-format = true
|
||||
bufferline = "multiple"
|
||||
color-modes = true
|
||||
completion-timeout = 5
|
||||
cursorline = false
|
||||
line-number = "relative"
|
||||
mouse = true
|
||||
true-color = true
|
||||
|
||||
[editor.cursor-shape]
|
||||
insert = "bar"
|
||||
normal = "block"
|
||||
select = "underline"
|
||||
|
||||
[editor.file-picker]
|
||||
hidden = true
|
||||
|
||||
[editor.gutters]
|
||||
layout = ["diff", "diagnostics", "line-numbers", "spacer"]
|
||||
|
||||
[editor.indent-guides]
|
||||
render = true
|
||||
|
||||
[editor.inline-diagnostics]
|
||||
cursor-line = "hint"
|
||||
other-lines = "error"
|
||||
|
||||
[editor.lsp]
|
||||
auto-signature-help = true
|
||||
display-inlay-hints = false
|
||||
display-messages = true
|
||||
enable = true
|
||||
snippets = true
|
||||
|
||||
[editor.soft-wrap]
|
||||
enable = true
|
||||
|
||||
[editor.statusline]
|
||||
left = ["spinner", "version-control", "diagnostics", "file-name"]
|
||||
right = ["file-base-name", "file-type", "position", "file-encoding"]
|
||||
|
||||
[keys.normal]
|
||||
";" = "flip_selections"
|
||||
"A-;" = "collapse_selection"
|
||||
A-H = "goto_previous_buffer"
|
||||
A-L = "goto_next_buffer"
|
||||
A-f = ":format"
|
||||
A-r = ":reload"
|
||||
A-w = ":buffer-close"
|
||||
A-x = "extend_to_line_bounds"
|
||||
H = "extend_char_left"
|
||||
J = "extend_line_down"
|
||||
K = "extend_line_up"
|
||||
L = "extend_char_right"
|
||||
X = ["extend_line_up", "extend_to_line_bounds"]
|
||||
esc = ["collapse_selection", "keep_primary_selection", "normal_mode"]
|
||||
|
||||
[keys.normal.space]
|
||||
i = ":toggle lsp.display-inlay-hints"
|
||||
|
||||
[keys.select]
|
||||
A-x = "extend_to_line_bounds"
|
||||
X = ["extend_line_up", "extend_to_line_bounds"]
|
||||
|
||||
[keys.select.g]
|
||||
e = "goto_file_end"
|
240
languages.toml
Normal file
240
languages.toml
Normal file
|
@ -0,0 +1,240 @@
|
|||
[[language]]
|
||||
auto-format = true
|
||||
name = "bash"
|
||||
|
||||
[language.formatter]
|
||||
args = ["-i", "2"]
|
||||
command = "/nix/store/i2n1mira4g8wddjcd85mh8sccdgaf2q5-shfmt-3.11.0/bin/shfmt"
|
||||
|
||||
[[language]]
|
||||
file-types = ["clj", "cljs", "cljc", "clje", "cljr", "cljx", "edn", "boot", "yuck"]
|
||||
injection-regex = "(clojure|clj|edn|boot|yuck)"
|
||||
name = "clojure"
|
||||
|
||||
[[language]]
|
||||
auto-format = true
|
||||
language-servers = ["cmake-language-server"]
|
||||
name = "cmake"
|
||||
|
||||
[language.formatter]
|
||||
args = ["-"]
|
||||
command = "/nix/store/yxhdb8acdzv6jxvl92jhb637z10x0a72-cmake-format-0.6.13/bin/cmake-format"
|
||||
|
||||
[[language]]
|
||||
auto-format = true
|
||||
language-servers = ["dprint", "typescript-language-server"]
|
||||
name = "javascript"
|
||||
|
||||
[[language]]
|
||||
file-types = ["jjdescription"]
|
||||
language-servers = ["scls"]
|
||||
name = "jjdescription"
|
||||
scope = "source.jjdescription"
|
||||
|
||||
[[language]]
|
||||
name = "json"
|
||||
|
||||
[language.formatter]
|
||||
args = ["fmt", "-", "--ext", "json"]
|
||||
command = "/nix/store/g47v9xixy8v2jn0k54df8hx7av885sa0-deno-2.3.6/bin/deno"
|
||||
|
||||
[[language]]
|
||||
auto-format = true
|
||||
language-servers = ["scls", "taplo"]
|
||||
name = "markdown"
|
||||
|
||||
[language.formatter]
|
||||
args = ["fmt", "-", "--ext", "md"]
|
||||
command = "/nix/store/g47v9xixy8v2jn0k54df8hx7av885sa0-deno-2.3.6/bin/deno"
|
||||
|
||||
[[language]]
|
||||
language-servers = ["nil", "scls", "deadnix"]
|
||||
name = "nix"
|
||||
|
||||
[[language]]
|
||||
language-servers = ["qmlls"]
|
||||
name = "qml"
|
||||
|
||||
[[language]]
|
||||
auto-format = true
|
||||
language-servers = ["basedpyright", "ruff"]
|
||||
name = "python"
|
||||
|
||||
[[language]]
|
||||
auto-format = true
|
||||
language-servers = ["dprint", "typescript-language-server"]
|
||||
name = "typescript"
|
||||
|
||||
[[language]]
|
||||
name = "rust"
|
||||
|
||||
[[language]]
|
||||
auto-format = true
|
||||
language-servers = ["clangd"]
|
||||
name = "c"
|
||||
|
||||
[[language]]
|
||||
auto-format = true
|
||||
name = "zig"
|
||||
|
||||
[[language]]
|
||||
name = "c"
|
||||
|
||||
[language.debugger]
|
||||
command = "/nix/store/30ny2x1zhcl6k65nmw6bqn9z7mrk0afy-gdb-16.3/bin/gdb"
|
||||
name = "gdb"
|
||||
transport = "stdio"
|
||||
|
||||
[[language.debugger.templates]]
|
||||
name = "binary"
|
||||
request = "launch"
|
||||
[[language.debugger.templates.completion]]
|
||||
completion = "filename"
|
||||
name = "binary"
|
||||
|
||||
[language.debugger.templates.args]
|
||||
program = "{0}"
|
||||
runInTerminal = true
|
||||
|
||||
[language-server.basedpyright]
|
||||
command = "/nix/store/0sh11lymzi1m170swkm82sx6r4k14ss3-basedpyright-1.29.4/bin/basedpyright-langserver"
|
||||
|
||||
[language-server.bash-language-server]
|
||||
args = ["start"]
|
||||
command = "/nix/store/dcv7h8ysjxmgb9i5972n63p3rzxqy94p-bash-language-server-5.6.0/bin/bash-language-server"
|
||||
|
||||
[language-server.clangd]
|
||||
command = "/nix/store/bx82p30rpg1nf54zs0gk7vqdg7bs7kb3-clang-tools-19.1.7/bin/clangd"
|
||||
|
||||
[language-server.clangd.clangd]
|
||||
fallbackFlags = ["-std=c++2b"]
|
||||
|
||||
[language-server.cmake-language-server]
|
||||
command = "/nix/store/zpaqswjjncvarqdlgsh9wzhi504y8lpi-cmake-language-server-0.1.11/bin/cmake-language-server"
|
||||
|
||||
[language-server.deadnix]
|
||||
command = "/nix/store/lg4dswldiwq04c5q1bn0hlr0q35p78rn-deadnix-1.2.1/bin/deadnix"
|
||||
|
||||
[language-server.deno-lsp]
|
||||
args = ["lsp"]
|
||||
command = "/nix/store/g47v9xixy8v2jn0k54df8hx7av885sa0-deno-2.3.6/bin/deno"
|
||||
|
||||
[language-server.deno-lsp.config.deno]
|
||||
enable = true
|
||||
lint = true
|
||||
unstable = true
|
||||
|
||||
[language-server.deno-lsp.config.deno.inlayHints.enumMemberValues]
|
||||
enabled = true
|
||||
|
||||
[language-server.deno-lsp.config.deno.inlayHints.functionLikeReturnTypes]
|
||||
enabled = true
|
||||
|
||||
[language-server.deno-lsp.config.deno.inlayHints.parameterNames]
|
||||
enabled = "all"
|
||||
|
||||
[language-server.deno-lsp.config.deno.inlayHints.parameterTypes]
|
||||
enabled = true
|
||||
|
||||
[language-server.deno-lsp.config.deno.inlayHints.propertyDeclarationTypes]
|
||||
enabled = true
|
||||
|
||||
[language-server.deno-lsp.config.deno.inlayHints.variableTypes]
|
||||
enabled = true
|
||||
|
||||
[language-server.deno-lsp.config.deno.suggest]
|
||||
completeFunctionCalls = false
|
||||
|
||||
[language-server.deno-lsp.config.deno.suggest.imports.hosts]
|
||||
"https://deno.land" = true
|
||||
|
||||
[language-server.deno-lsp.environment]
|
||||
NO_COLOR = "1"
|
||||
|
||||
[language-server.dprint]
|
||||
args = ["lsp"]
|
||||
command = "/nix/store/h7z1irpdrvi96ms9akdmzamj7xy7ax9l-dprint-0.50.0/bin/dprint"
|
||||
|
||||
[language-server.nil]
|
||||
command = "/nix/store/bcj2njar1n0kqpvkfj78mkldbx23im18-nil-unstable-02-06-2025/bin/nil"
|
||||
|
||||
[language-server.nil.config.nil.formatting]
|
||||
command = ["/nix/store/58230yv4qkhn5psmf2galbjl66lh5zmp-alejandra-4.0.0/bin/alejandra", "-q"]
|
||||
|
||||
[language-server.qmlls]
|
||||
args = ["-E"]
|
||||
command = "/nix/store/g0ahmk2wixwwibdb49p29l69vhm6ymwa-qtdeclarative-6.9.0/bin/qmlls"
|
||||
|
||||
[language-server.ruff]
|
||||
args = ["server"]
|
||||
command = "/nix/store/l1rij3b43sz459myl59i4d1lsl47cnzd-ruff-0.12.0/bin/ruff"
|
||||
|
||||
[language-server.rust-analyzer.config.cargo]
|
||||
features = "all"
|
||||
|
||||
[language-server.rust-analyzer.config.check]
|
||||
command = "clippy"
|
||||
extraArgs = [
|
||||
"--",
|
||||
"-D",
|
||||
"clippy::pedantic",
|
||||
"-W",
|
||||
"clippy::nursery",
|
||||
"-W",
|
||||
"clippy::perf",
|
||||
]
|
||||
|
||||
[language-server.scls]
|
||||
command = "/nix/store/ibpnrld4lpnrz3w0ksnyiw4z4vmqki76-simple-completion-language-server-0-unstable-2025-01-31/bin/simple-completion-language-server"
|
||||
|
||||
[language-server.scls.config]
|
||||
feature_citations = false
|
||||
feature_paths = false
|
||||
feature_snippets = true
|
||||
feature_unicode_input = false
|
||||
feature_words = true
|
||||
max_completion_items = 100
|
||||
snippets_first = true
|
||||
snippets_inline_by_word_tail = false
|
||||
|
||||
[language-server.typescript-language-server]
|
||||
args = ["--stdio"]
|
||||
command = "/nix/store/7xllvpjj8a7rv1mq7mxzj657q520vl26-typescript-language-server-4.3.3/bin/typescript-language-server"
|
||||
|
||||
[language-server.typescript-language-server.config.typescript-language-server.source.addMissingImports]
|
||||
ts = true
|
||||
|
||||
[language-server.typescript-language-server.config.typescript-language-server.source.fixAll]
|
||||
ts = true
|
||||
|
||||
[language-server.typescript-language-server.config.typescript-language-server.source.organizeImports]
|
||||
ts = true
|
||||
|
||||
[language-server.typescript-language-server.config.typescript-language-server.source.removeUnusedImports]
|
||||
ts = true
|
||||
|
||||
[language-server.typescript-language-server.config.typescript-language-server.source.sortImports]
|
||||
ts = true
|
||||
|
||||
[language-server.vscode-css-language-server]
|
||||
args = ["--stdio"]
|
||||
command = "/nix/store/kd0pk97ssa10z33r4sg30xpfvl252dyc-vscode-langservers-extracted-4.10.0/bin/vscode-css-language-server"
|
||||
|
||||
[language-server.vscode-css-language-server.config]
|
||||
provideFormatter = true
|
||||
|
||||
[language-server.vscode-css-language-server.config.css.validate]
|
||||
enable = true
|
||||
|
||||
[language-server.vscode-css-language-server.config.scss.validate]
|
||||
enable = true
|
||||
|
||||
[language-server.zls]
|
||||
command = "/nix/store/plzslh5qqrb60144w2drj5znd0hfp6av-zls-0.14.0/bin/zls"
|
||||
|
||||
[language-server.zls.config]
|
||||
build_on_save_args = ["check", "-fincremental", "--watch"]
|
||||
enable_autofix = false
|
||||
enable_build_on_save = true
|
||||
highlight_global_var_declarations = true
|
||||
warn_style = true
|
105
nushell/atuin.nu
Normal file
105
nushell/atuin.nu
Normal file
|
@ -0,0 +1,105 @@
|
|||
# =============================================================================
|
||||
$env.ATUIN_SESSION = (atuin uuid)
|
||||
hide-env -i ATUIN_HISTORY_ID
|
||||
|
||||
# Magic token to make sure we don't record commands run by keybindings
|
||||
let ATUIN_KEYBINDING_TOKEN = $"# (random uuid)"
|
||||
|
||||
let _atuin_pre_execution = {||
|
||||
if ($nu | get -i history-enabled) == false {
|
||||
return
|
||||
}
|
||||
let cmd = (commandline)
|
||||
if ($cmd | is-empty) {
|
||||
return
|
||||
}
|
||||
if not ($cmd | str starts-with $ATUIN_KEYBINDING_TOKEN) {
|
||||
$env.ATUIN_HISTORY_ID = (atuin history start -- $cmd)
|
||||
}
|
||||
}
|
||||
# =============================================================================
|
||||
|
||||
let _atuin_pre_prompt = {||
|
||||
let last_exit = $env.LAST_EXIT_CODE
|
||||
if 'ATUIN_HISTORY_ID' not-in $env {
|
||||
return
|
||||
}
|
||||
with-env { ATUIN_LOG: error } {
|
||||
do { atuin history end $'--exit=($last_exit)' -- $env.ATUIN_HISTORY_ID } | complete
|
||||
|
||||
}
|
||||
hide-env ATUIN_HISTORY_ID
|
||||
}
|
||||
# =============================================================================
|
||||
|
||||
def _atuin_search_cmd [...flags: string] {
|
||||
let nu_version = do {
|
||||
let version = version
|
||||
let major = $version.major?
|
||||
if $major != null {
|
||||
# These members are only available in versions > 0.92.2
|
||||
[$major $version.minor $version.patch]
|
||||
} else {
|
||||
# So fall back to the slower parsing when they're missing
|
||||
$version.version | split row '.' | into int
|
||||
}
|
||||
}
|
||||
[
|
||||
$ATUIN_KEYBINDING_TOKEN,
|
||||
([
|
||||
`with-env { ATUIN_LOG: error, ATUIN_QUERY: (commandline) } {`,
|
||||
(if $nu_version.0 <= 0 and $nu_version.1 <= 90 { 'commandline' } else { 'commandline edit' }),
|
||||
(if $nu_version.1 >= 92 { '(run-external atuin search' } else { '(run-external --redirect-stderr atuin search' }),
|
||||
($flags | append [--interactive] | each {|e| $'"($e)"'}),
|
||||
(if $nu_version.1 >= 92 { ' e>| str trim)' } else {' | complete | $in.stderr | str substring ..-1)'}),
|
||||
`}`,
|
||||
] | flatten | str join ' '),
|
||||
] | str join "\n"
|
||||
}
|
||||
# =============================================================================
|
||||
|
||||
$env.config = ($env | default {} config).config
|
||||
$env.config = ($env.config | default {} hooks)
|
||||
$env.config = (
|
||||
$env.config | upsert hooks (
|
||||
$env.config.hooks
|
||||
| upsert pre_execution (
|
||||
$env.config.hooks | get -i pre_execution | default [] | append $_atuin_pre_execution)
|
||||
| upsert pre_prompt (
|
||||
$env.config.hooks | get -i pre_prompt | default [] | append $_atuin_pre_prompt)
|
||||
)
|
||||
)
|
||||
|
||||
$env.config = ($env.config | default [] keybindings)
|
||||
|
||||
$env.config = (
|
||||
$env.config | upsert keybindings (
|
||||
$env.config.keybindings
|
||||
| append {
|
||||
name: atuin
|
||||
modifier: control
|
||||
keycode: char_r
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: executehostcommand cmd: (_atuin_search_cmd) }
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
$env.config = (
|
||||
$env.config | upsert keybindings (
|
||||
$env.config.keybindings
|
||||
| append {
|
||||
name: atuin
|
||||
modifier: none
|
||||
keycode: up
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: menuup}
|
||||
{send: executehostcommand cmd: (_atuin_search_cmd '--shell-up-key-binding') }
|
||||
]
|
||||
}
|
||||
}
|
||||
)
|
||||
)
|
||||
# =============================================================================
|
462
nushell/config.nu
Normal file
462
nushell/config.nu
Normal file
|
@ -0,0 +1,462 @@
|
|||
$env.config = {
|
||||
bracketed_paste: true
|
||||
buffer_editor: ""
|
||||
datetime_format: {}
|
||||
edit_mode: vi
|
||||
error_style: fancy
|
||||
float_precision: 2
|
||||
footer_mode: 25
|
||||
render_right_prompt_on_last_line: false
|
||||
show_banner: false
|
||||
use_ansi_coloring: true
|
||||
use_kitty_protocol: true
|
||||
|
||||
shell_integration: {
|
||||
osc2: false
|
||||
osc7: true
|
||||
osc8: true
|
||||
osc9_9: false
|
||||
osc133: true
|
||||
osc633: true
|
||||
reset_application_mode: true
|
||||
}
|
||||
}
|
||||
|
||||
$env.config.color_config = {
|
||||
binary: white
|
||||
block: white
|
||||
bool: {|| if $in { "light_green" } else { "light_red" } }
|
||||
cell-path: white
|
||||
date: purple
|
||||
duration: white
|
||||
empty: blue
|
||||
filesize: cyan
|
||||
float: white
|
||||
header: green_bold
|
||||
hints: dark_gray
|
||||
int: white
|
||||
list: white
|
||||
nothing: white
|
||||
range: white
|
||||
record: white
|
||||
row_index: green_bold
|
||||
search_result: { bg: red fg: white }
|
||||
separator: white
|
||||
string: {|| if $in =~ "^(#|0x)[a-fA-F0-9]+$" { ($in | str replace "0x" "#") } else { "white" } }
|
||||
leading_trailing_space_bg: { attr: n }
|
||||
|
||||
shape_and: purple_bold
|
||||
shape_binary: purple_bold
|
||||
shape_block: blue_bold
|
||||
shape_bool: light_cyan
|
||||
shape_closure: green_bold
|
||||
shape_custom: green
|
||||
shape_datetime: cyan_bold
|
||||
shape_directory: cyan
|
||||
shape_external: cyan
|
||||
shape_externalarg: green_bold
|
||||
shape_filepath: cyan
|
||||
shape_flag: blue_bold
|
||||
shape_float: purple_bold
|
||||
shape_garbage: { fg: white bg: red attr: b}
|
||||
shape_globpattern: cyan_bold
|
||||
shape_int: purple_bold
|
||||
shape_internalcall: cyan_bold
|
||||
shape_list: cyan_bold
|
||||
shape_literal: blue
|
||||
shape_match_pattern: green
|
||||
shape_nothing: light_cyan
|
||||
shape_operator: yellow
|
||||
shape_or: purple_bold
|
||||
shape_pipe: purple_bold
|
||||
shape_range: yellow_bold
|
||||
shape_record: cyan_bold
|
||||
shape_redirection: purple_bold
|
||||
shape_signature: green_bold
|
||||
shape_string: green
|
||||
shape_table: blue_bold
|
||||
shape_vardecl: purple
|
||||
shape_variable: purple
|
||||
shape_matching_brackets: { attr: u }
|
||||
shape_string_interpolation: cyan_bold
|
||||
}
|
||||
|
||||
$env.config.ls = {
|
||||
clickable_links: true
|
||||
use_ls_colors: true
|
||||
}
|
||||
|
||||
$env.config.rm.always_trash = true
|
||||
|
||||
$env.config.table = {
|
||||
header_on_separator: false
|
||||
index_mode: always
|
||||
mode: light
|
||||
padding: { left: 1 right: 1 }
|
||||
show_empty: true
|
||||
trim: {
|
||||
methodology: wrapping
|
||||
wrapping_try_keep_words: true
|
||||
truncating_suffix: "..."
|
||||
}
|
||||
}
|
||||
|
||||
$env.config.explore = {
|
||||
command_bar_text: { fg: "#C4C9C6" }
|
||||
highlight: { fg: black bg: yellow }
|
||||
status: {
|
||||
error: { fg: white bg: red }
|
||||
warn: {}
|
||||
info: {}
|
||||
}
|
||||
status_bar_background: { fg: "#1D1F21" bg: "#C4C9C6" }
|
||||
table: {
|
||||
split_line: { fg: "#404040" }
|
||||
selected_cell: { bg: light_blue }
|
||||
selected_row: {}
|
||||
selected_column: {}
|
||||
}
|
||||
}
|
||||
|
||||
$env.config.history = {
|
||||
file_format: sqlite
|
||||
isolation: false
|
||||
max_size: 100_000
|
||||
sync_on_enter: true
|
||||
}
|
||||
|
||||
$env.config.completions = {
|
||||
algorithm: prefix
|
||||
case_sensitive: false
|
||||
partial: true
|
||||
quick: true
|
||||
external: {
|
||||
enable: true
|
||||
max_results: 100
|
||||
completer: {|tokens: list<string>|
|
||||
let expanded = scope aliases | where name == $tokens.0 | get --ignore-errors expansion.0
|
||||
|
||||
mut expanded_tokens = if $expanded != null and $tokens.0 != "cd" {
|
||||
$expanded | split row " " | append ($tokens | skip 1)
|
||||
} else {
|
||||
$tokens
|
||||
}
|
||||
|
||||
$expanded_tokens.0 = ($expanded_tokens.0 | str trim --left --char "^")
|
||||
|
||||
fish --command $"complete '--do-complete=($expanded_tokens | str join ' ')'"
|
||||
| $"value(char tab)description(char newline)" + $in
|
||||
| from tsv --flexible --no-infer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$env.config.cursor_shape = {
|
||||
vi_insert: block
|
||||
vi_normal: block
|
||||
}
|
||||
|
||||
$env.config.hooks = {
|
||||
command_not_found: {||}
|
||||
|
||||
display_output: {
|
||||
tee { table --expand | print }
|
||||
| $env.last = $in
|
||||
}
|
||||
|
||||
|
||||
pre_execution: [
|
||||
{
|
||||
let prompt = commandline | str trim
|
||||
|
||||
if ($prompt | is-empty) {
|
||||
return
|
||||
}
|
||||
|
||||
print $"(ansi title)($prompt) — nu(char bel)"
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
pre_prompt: [
|
||||
{
|
||||
if (which direnv | is-empty) {
|
||||
return
|
||||
}
|
||||
|
||||
direnv export json | from json | default {} | load-env
|
||||
# Direnv outputs $PATH as a string, but nushell silently breaks if isn't a list-like table.
|
||||
# The following behemoth of Nu code turns this into nu's format while following the standards of how to handle quotes, use it if you need quote handling instead of the line below it:
|
||||
# $env.PATH = $env.PATH | parse --regex ('' + `((?:(?:"(?:(?:\\[\\"])|.)*?")|(?:'.*?')|[^` + (char env_sep) + `]*)*)`) | each {|x| $x.capture0 | parse --regex `(?:"((?:(?:\\"|.))*?)")|(?:'(.*?)')|([^'"]*)` | each {|y| if ($y.capture0 != "") { $y.capture0 | str replace -ar `\\([\\"])` `$1` } else if ($y.capture1 != "") { $y.capture1 } else $y.capture2 } | str join }
|
||||
$env.PATH = $env.PATH | split row (char env_sep)
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
# Retrieve the output of the last command.
|
||||
def _ []: nothing -> any {
|
||||
$env.last
|
||||
}
|
||||
|
||||
$env.config.menus = [
|
||||
{
|
||||
marker: "| "
|
||||
name: completion_menu
|
||||
only_buffer_difference: false
|
||||
style: {
|
||||
description_text: yellow
|
||||
selected_text: green_reverse
|
||||
text: green
|
||||
}
|
||||
type: {
|
||||
col_padding: 2
|
||||
col_width: 20
|
||||
columns: 4
|
||||
layout: columnar
|
||||
}
|
||||
}
|
||||
{
|
||||
marker: "? "
|
||||
name: history_menu
|
||||
only_buffer_difference: true
|
||||
style: {
|
||||
description_text: yellow
|
||||
selected_text: green_reverse
|
||||
text: green
|
||||
}
|
||||
type: {
|
||||
layout: list
|
||||
page_size: 10
|
||||
}
|
||||
}
|
||||
{
|
||||
marker: "? "
|
||||
name: help_menu
|
||||
only_buffer_difference: true
|
||||
style: {
|
||||
description_text: yellow
|
||||
selected_text: green_reverse
|
||||
text: green
|
||||
}
|
||||
type: {
|
||||
col_padding: 2
|
||||
col_width: 20
|
||||
columns: 4
|
||||
description_rows: 10
|
||||
layout: description
|
||||
selection_rows: 4
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
$env.config.keybindings = [
|
||||
{
|
||||
name: copy_commandline
|
||||
modifier: alt
|
||||
keycode: char_c
|
||||
mode: [ vi_normal vi_insert ]
|
||||
event: {
|
||||
send: executehostcommand
|
||||
cmd: 'commandline | nu-highlight | $"```ansi\n($in)\n```" | copy'
|
||||
}
|
||||
}
|
||||
{
|
||||
name: completion_menu
|
||||
modifier: none
|
||||
keycode: tab
|
||||
mode: [ vi_normal vi_insert ]
|
||||
event: {
|
||||
until: [
|
||||
{ send: menu name: completion_menu }
|
||||
{ send: menunext }
|
||||
{ edit: complete }
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: history_menu
|
||||
modifier: control
|
||||
keycode: char_h
|
||||
mode: [ vi_insert vi_normal ]
|
||||
event: { send: menu name: history_menu }
|
||||
}
|
||||
{
|
||||
name: escape
|
||||
modifier: none
|
||||
keycode: escape
|
||||
mode: [ vi_normal vi_insert ]
|
||||
event: { send: esc }
|
||||
}
|
||||
{
|
||||
name: cancel_command
|
||||
modifier: control
|
||||
keycode: char_c
|
||||
mode: [ vi_normal vi_insert ]
|
||||
event: { send: ctrlc }
|
||||
}
|
||||
{
|
||||
name: quit_shell
|
||||
modifier: control
|
||||
keycode: char_d
|
||||
mode: [ vi_normal vi_insert ]
|
||||
event: { send: ctrld }
|
||||
}
|
||||
{
|
||||
name: clear_screen
|
||||
modifier: control
|
||||
keycode: char_l
|
||||
mode: [ vi_normal vi_insert ]
|
||||
event: { send: clearscreen }
|
||||
}
|
||||
{
|
||||
name: open_command_editor
|
||||
modifier: control
|
||||
keycode: char_o
|
||||
mode: [ vi_normal vi_insert ]
|
||||
event: { send: openeditor }
|
||||
}
|
||||
{
|
||||
name: abbr
|
||||
modifier: control
|
||||
keycode: space
|
||||
mode: [ vi_normal vi_insert ]
|
||||
event: [
|
||||
{ send: menu name: abbr_menu }
|
||||
{ edit: insertchar, value: " " }
|
||||
]
|
||||
}
|
||||
{
|
||||
name: move_down
|
||||
modifier: none
|
||||
keycode: down
|
||||
mode: [ vi_normal vi_insert ]
|
||||
event: {
|
||||
until: [
|
||||
{ send: menudown }
|
||||
{ send: down }
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_left
|
||||
modifier: none
|
||||
keycode: left
|
||||
mode: [ vi_normal vi_insert ]
|
||||
event: {
|
||||
until: [
|
||||
{ send: menuleft }
|
||||
{ send: left }
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_right_or_take_history_hint
|
||||
modifier: none
|
||||
keycode: right
|
||||
mode: [ vi_normal vi_insert ]
|
||||
event: {
|
||||
until: [
|
||||
{ send: historyhintcomplete }
|
||||
{ send: menuright }
|
||||
{ send: right }
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_one_word_left
|
||||
modifier: control
|
||||
keycode: left
|
||||
mode: [ vi_normal vi_insert ]
|
||||
event: { edit: movewordleft }
|
||||
}
|
||||
{
|
||||
name: move_one_word_right_or_take_history_hint
|
||||
modifier: control
|
||||
keycode: right
|
||||
mode: [ vi_normal vi_insert ]
|
||||
event: {
|
||||
until: [
|
||||
{ send: historyhintwordcomplete }
|
||||
{ edit: movewordright }
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_to_line_start
|
||||
modifier: control
|
||||
keycode: char_a
|
||||
mode: [ vi_normal vi_insert ]
|
||||
event: { edit: movetolinestart }
|
||||
}
|
||||
{
|
||||
name: move_to_line_end_or_take_history_hint
|
||||
modifier: control
|
||||
keycode: char_e
|
||||
mode: [ vi_normal vi_insert ]
|
||||
event: {
|
||||
until: [
|
||||
{ send: historyhintcomplete }
|
||||
{ edit: movetolineend }
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: delete_one_character_backward
|
||||
modifier: none
|
||||
keycode: backspace
|
||||
mode: vi_insert
|
||||
event: { edit: backspace }
|
||||
}
|
||||
{
|
||||
name: delete_one_word_backward
|
||||
modifier: control
|
||||
keycode: backspace
|
||||
mode: vi_insert
|
||||
event: { edit: backspaceword }
|
||||
}
|
||||
{
|
||||
name: newline_or_run_command
|
||||
modifier: none
|
||||
keycode: enter
|
||||
mode: vi_insert
|
||||
event: { send: enter }
|
||||
}
|
||||
{
|
||||
name: take_history_hint
|
||||
modifier: control
|
||||
keycode: char_f
|
||||
mode: [ vi_normal vi_insert ]
|
||||
event: {
|
||||
until: [
|
||||
{ send: historyhintcomplete }
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
source ~/.config/nushell/atuin.nu
|
||||
|
||||
source ~/.config/nushell/zoxide.nu
|
||||
# source ~/.config/nushell/source_profile.nu
|
||||
|
||||
# fix sudo by prepending /run/wrappers/bin to the PATH
|
||||
# $env.PATH = ($env.PATH | split row (char esep) | prepend '/run/wrappers/bin')
|
||||
|
||||
|
||||
|
||||
$env.STARSHIP_SHELL = "nu"
|
||||
|
||||
def create_left_prompt [] {
|
||||
starship prompt --cmd-duration $env.CMD_DURATION_MS $'--status=($env.LAST_EXIT_CODE)'
|
||||
}
|
||||
|
||||
# Use nushell functions to define your right and left prompt
|
||||
$env.PROMPT_COMMAND = { || create_left_prompt }
|
||||
$env.PROMPT_COMMAND_RIGHT = ""
|
||||
|
||||
# The prompt indicators are environmental variables that represent
|
||||
# the state of the prompt
|
||||
$env.PROMPT_INDICATOR = ""
|
||||
$env.PROMPT_INDICATOR_VI_INSERT = ": "
|
||||
$env.PROMPT_INDICATOR_VI_NORMAL = "〉"
|
||||
$env.PROMPT_MULTILINE_INDICATOR = "::: "
|
26
nushell/env.nu
Normal file
26
nushell/env.nu
Normal file
|
@ -0,0 +1,26 @@
|
|||
# env.nu
|
||||
#
|
||||
# Installed by:
|
||||
# version = "0.102.0"
|
||||
#
|
||||
# Previously, environment variables were typically configured in `env.nu`.
|
||||
# In general, most configuration can and should be performed in `config.nu`
|
||||
# or one of the autoload directories.
|
||||
#
|
||||
# This file is generated for backwards compatibility for now.
|
||||
# It is loaded before config.nu and login.nu
|
||||
#
|
||||
# See https://www.nushell.sh/book/configuration.html
|
||||
#
|
||||
# Also see `help config env` for more options.
|
||||
#
|
||||
# You can remove these comments if you want or leave
|
||||
# them for future reference.
|
||||
#
|
||||
# def --wrapped sudo [...rest] {
|
||||
# let escaped_args = $rest
|
||||
# | 1..
|
||||
# | each { || to nuon }
|
||||
# | str join ' '
|
||||
# ^sudo env XDG_RUNTIME_DIR=/run/user/0 nu --login --commands $'($rest.0) ($escaped_args)'
|
||||
# }
|
44
nushell/starship.nu
Normal file
44
nushell/starship.nu
Normal file
|
@ -0,0 +1,44 @@
|
|||
# this file is both a valid
|
||||
# - overlay which can be loaded with `overlay use starship.nu`
|
||||
# - module which can be used with `use starship.nu`
|
||||
# - script which can be used with `source starship.nu`
|
||||
export-env { $env.STARSHIP_SHELL = "nu"; load-env {
|
||||
STARSHIP_SESSION_KEY: (random chars -l 16)
|
||||
PROMPT_MULTILINE_INDICATOR: (
|
||||
^/run/current-system/sw/bin/starship prompt --continuation
|
||||
)
|
||||
|
||||
# Does not play well with default character module.
|
||||
# TODO: Also Use starship vi mode indicators?
|
||||
PROMPT_INDICATOR: ""
|
||||
|
||||
PROMPT_COMMAND: {||
|
||||
# jobs are not supported
|
||||
(
|
||||
^/run/current-system/sw/bin/starship prompt
|
||||
--cmd-duration $env.CMD_DURATION_MS
|
||||
$"--status=($env.LAST_EXIT_CODE)"
|
||||
--terminal-width (term size).columns
|
||||
)
|
||||
}
|
||||
|
||||
config: ($env.config? | default {} | merge {
|
||||
render_right_prompt_on_last_line: true
|
||||
})
|
||||
|
||||
PROMPT_COMMAND_RIGHT: {||
|
||||
(
|
||||
^/run/current-system/sw/bin/starship prompt
|
||||
--right
|
||||
--cmd-duration $env.CMD_DURATION_MS
|
||||
$"--status=($env.LAST_EXIT_CODE)"
|
||||
--terminal-width (term size).columns
|
||||
)
|
||||
}
|
||||
}}
|
||||
|
||||
|
||||
def create_left_prompt [] {
|
||||
starship prompt --cmd-duration $env.CMD_DURATION_MS $'--status=($env.LAST_EXIT_CODE)'
|
||||
}
|
||||
|
57
nushell/zoxide.nu
Normal file
57
nushell/zoxide.nu
Normal file
|
@ -0,0 +1,57 @@
|
|||
# =============================================================================
|
||||
#
|
||||
# Hook configuration for zoxide.
|
||||
#
|
||||
|
||||
# Initialize hook to add new entries to the database.
|
||||
export-env {
|
||||
$env.config = (
|
||||
$env.config?
|
||||
| default {}
|
||||
| upsert hooks { default {} }
|
||||
| upsert hooks.env_change { default {} }
|
||||
| upsert hooks.env_change.PWD { default [] }
|
||||
)
|
||||
let __zoxide_hooked = (
|
||||
$env.config.hooks.env_change.PWD | any { try { get __zoxide_hook } catch { false } }
|
||||
)
|
||||
if not $__zoxide_hooked {
|
||||
$env.config.hooks.env_change.PWD = ($env.config.hooks.env_change.PWD | append {
|
||||
__zoxide_hook: true,
|
||||
code: {|_, dir| zoxide add -- $dir}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
#
|
||||
# When using zoxide with --no-cmd, alias these internal functions as desired.
|
||||
#
|
||||
|
||||
# Jump to a directory using only keywords.
|
||||
def --env --wrapped __zoxide_z [...rest: string] {
|
||||
let path = match $rest {
|
||||
[] => {'~'},
|
||||
[ '-' ] => {'-'},
|
||||
[ $arg ] if ($arg | path expand | path type) == 'dir' => {$arg}
|
||||
_ => {
|
||||
zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n"
|
||||
}
|
||||
}
|
||||
cd $path
|
||||
}
|
||||
|
||||
# Jump to a directory using interactive search.
|
||||
def --env --wrapped __zoxide_zi [...rest:string] {
|
||||
cd $'(zoxide query --interactive -- ...$rest | str trim -r -c "\n")'
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
#
|
||||
# Commands for zoxide. Disable these using --no-cmd.
|
||||
#
|
||||
|
||||
alias cd = __zoxide_z
|
||||
alias ci = __zoxide_zi
|
||||
|
||||
# =============================================================================
|
61
safe.toml
Normal file
61
safe.toml
Normal file
|
@ -0,0 +1,61 @@
|
|||
[user]
|
||||
name = ""
|
||||
email = ""
|
||||
|
||||
[ui]
|
||||
pager = ["bat", "--plain"]
|
||||
default-command = ["log"]
|
||||
|
||||
[ui.movement]
|
||||
edit = true
|
||||
|
||||
[ui.diff]
|
||||
tool = ["difft", "--color", "always", "$left", "$right"]
|
||||
|
||||
|
||||
[git]
|
||||
push-new-bookmarks = true
|
||||
|
||||
|
||||
# [signing]
|
||||
# behavior = "own"
|
||||
# backend = "ssh"
|
||||
# key = "~/.ssh/id_ecdsa.pub"
|
||||
|
||||
|
||||
[aliases]
|
||||
c = ["commit"]
|
||||
ci = ["commit", "--interactive"]
|
||||
e = ["edit"]
|
||||
i = ["git", "init", "--colocate"]
|
||||
nb = ["bookmark", "create", "-r @-"] # "new bookmark"
|
||||
pull = ["git", "fetch"]
|
||||
push = ["git", "push", "--allow-new"]
|
||||
r = ["rebase"]
|
||||
s = ["squash"]
|
||||
si = ["squash", "--interactive"]
|
||||
tug = ["bookmark", "move", "--from", "closest_bookmark(@-)", "--to", "@-"]
|
||||
ls = ["util", "exec", "--", "sh", "-c", """
|
||||
jj log --limit 12
|
||||
echo
|
||||
jj status
|
||||
"""]
|
||||
|
||||
[revset-aliases]
|
||||
'closest_bookmark(to)' = 'heads(::to & bookmarks())'
|
||||
|
||||
[templates]
|
||||
draft_commit_description = '''
|
||||
concat(
|
||||
coalesce(description, "\n"),
|
||||
surround(
|
||||
"\nJJ: This commit contains the following changes:\n", "",
|
||||
indent("JJ: ", diff.stat(72)),
|
||||
),
|
||||
"\nJJ: ignore-rest\n",
|
||||
diff.git(),
|
||||
)
|
||||
'''
|
||||
|
||||
[template-aliases]
|
||||
'format_short_id(id)' = 'id.shortest()'
|
Loading…
Add table
Add a link
Reference in a new issue