Compare commits
49 Commits
78a9b670c1
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
5e7c193a28
|
|||
|
67f7129dac
|
|||
|
333bd228d4
|
|||
|
5c7e24e645
|
|||
|
4ff5da379c
|
|||
|
53b3e791df
|
|||
|
cf7a36c3ba
|
|||
|
af3ccebaae
|
|||
|
10c12125a3
|
|||
|
6e67fa87bb
|
|||
|
2628308f0b
|
|||
|
bbb7add614
|
|||
|
5b4f97982d
|
|||
| 96f80a024a | |||
| 18a93fe079 | |||
|
8517bc121c
|
|||
|
354a7118de
|
|||
|
d7b18e47b0
|
|||
|
5ae87c8796
|
|||
|
d395cc57c8
|
|||
| c910091882 | |||
|
f51a70d0a3
|
|||
|
98af89fa7d
|
|||
|
952a358d91
|
|||
|
594b3d667b
|
|||
|
e63b1fd2e6
|
|||
|
9661b20ede
|
|||
|
a59d2f6a65
|
|||
|
e10eb03b3d
|
|||
|
5abd83a2e5
|
|||
| b48aa761bb | |||
|
ffb0c2717e
|
|||
|
399ac740fa
|
|||
|
051927907d
|
|||
|
3fd0b5a647
|
|||
|
87b77cd412
|
|||
| 57198f0f77 | |||
|
5fe3c435c5
|
|||
|
7d8410f5ad
|
|||
|
9cb3239cfe
|
|||
|
0a7942333a
|
|||
| db852f5144 | |||
| 79b41aa29f | |||
|
d3cece065e
|
|||
|
979647e7ff
|
|||
|
f01522b313
|
|||
|
f9d5c1f65a
|
|||
|
fa4126ab3d
|
|||
|
a68cd06f99
|
220
tree/.config/caelestia/shell.json
Normal file
220
tree/.config/caelestia/shell.json
Normal file
@ -0,0 +1,220 @@
|
||||
{
|
||||
"appearance": {
|
||||
"anim": {
|
||||
"durations": {
|
||||
"scale": 1
|
||||
}
|
||||
},
|
||||
"font": {
|
||||
"family": {
|
||||
"material": "Material Symbols Rounded",
|
||||
"mono": "CaskaydiaCove NF",
|
||||
"sans": "Rubik"
|
||||
},
|
||||
"size": {
|
||||
"scale": 1
|
||||
}
|
||||
},
|
||||
"padding": {
|
||||
"scale": 1
|
||||
},
|
||||
"rounding": {
|
||||
"scale": 1
|
||||
},
|
||||
"spacing": {
|
||||
"scale": 1
|
||||
},
|
||||
"transparency": {
|
||||
"enabled": false,
|
||||
"base": 0.85,
|
||||
"layers": 0.4
|
||||
}
|
||||
},
|
||||
"general": {
|
||||
"apps": {
|
||||
"terminal": [
|
||||
"foot"
|
||||
],
|
||||
"audio": [
|
||||
"pavucontrol"
|
||||
]
|
||||
}
|
||||
},
|
||||
"background": {
|
||||
"desktopClock": {
|
||||
"enabled": false
|
||||
},
|
||||
"enabled": true,
|
||||
"visualiser": {
|
||||
"enabled": true,
|
||||
"autoHide": true,
|
||||
"rounding": 1,
|
||||
"spacing": 1
|
||||
}
|
||||
},
|
||||
"bar": {
|
||||
"clock": {
|
||||
"showIcon": false
|
||||
},
|
||||
"dragThreshold": 20,
|
||||
"entries": [
|
||||
{
|
||||
"id": "logo",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "workspaces",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "spacer",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "activeWindow",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "spacer",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "tray",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "clock",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "statusIcons",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "idleInhibitor",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "power",
|
||||
"enabled": true
|
||||
}
|
||||
],
|
||||
"persistent": false,
|
||||
"showOnHover": true,
|
||||
"status": {
|
||||
"showAudio": false,
|
||||
"showBattery": true,
|
||||
"showBluetooth": true,
|
||||
"showMicrophone": false,
|
||||
"showKbLayout": false,
|
||||
"showNetwork": true
|
||||
},
|
||||
"tray": {
|
||||
"background": true,
|
||||
"recolour": true
|
||||
},
|
||||
"workspaces": {
|
||||
"activeIndicator": true,
|
||||
"activeLabel": "",
|
||||
"activeTrail": false,
|
||||
"groupIconsByApp": true,
|
||||
"groupingRespectsLayout": true,
|
||||
"windowRighClickContext": true,
|
||||
"label": "◦",
|
||||
"occupiedBg": true,
|
||||
"occupiedLabel": "⊙",
|
||||
"showWindows": true,
|
||||
"shown": 4,
|
||||
"windowIconImage": false,
|
||||
"focusedWindowBlob": true,
|
||||
"windowIconGap": 0,
|
||||
"windowIconSize": 30
|
||||
}
|
||||
},
|
||||
"border": {
|
||||
"rounding": 25,
|
||||
"thickness": 10
|
||||
},
|
||||
"dashboard": {
|
||||
"mediaUpdateInterval": 500,
|
||||
"showOnHover": true
|
||||
},
|
||||
"launcher": {
|
||||
"actionPrefix": ">",
|
||||
"dragThreshold": 50,
|
||||
"vimKeybinds": false,
|
||||
"enableDangerousActions": false,
|
||||
"maxShown": 8,
|
||||
"maxWallpapers": 9,
|
||||
"specialPrefix": "@",
|
||||
"useFuzzy": {
|
||||
"apps": false,
|
||||
"actions": false,
|
||||
"schemes": false,
|
||||
"variants": false,
|
||||
"wallpapers": false
|
||||
},
|
||||
"showOnHover": false
|
||||
},
|
||||
"lock": {
|
||||
"recolourLogo": false
|
||||
},
|
||||
"notifs": {
|
||||
"actionOnClick": false,
|
||||
"clearThreshold": 0.3,
|
||||
"defaultExpireTimeout": 5000,
|
||||
"expandThreshold": 20,
|
||||
"expire": false
|
||||
},
|
||||
"osd": {
|
||||
"enabled": true,
|
||||
"enableBrightness": true,
|
||||
"enableMicrophone": true,
|
||||
"hideDelay": 2000
|
||||
},
|
||||
"paths": {
|
||||
"mediaGif": "root:/assets/bongocat.gif",
|
||||
"sessionGif": "root:/assets/kurukuru.gif",
|
||||
"wallpaperDir": "~/.config/wallpapers/"
|
||||
},
|
||||
"services": {
|
||||
"audioIncrement": 0.1,
|
||||
"defaultPlayer": "Spotify",
|
||||
"gpuType": "",
|
||||
"playerAliases": [
|
||||
{
|
||||
"from": "com.github.th_ch.youtube_music",
|
||||
"to": "YT Music"
|
||||
}
|
||||
],
|
||||
"weatherLocation": "",
|
||||
"useFahrenheit": false,
|
||||
"useTwelveHourClock": false,
|
||||
"smartScheme": true,
|
||||
"visualiserBars": 45
|
||||
},
|
||||
"session": {
|
||||
"dragThreshold": 30,
|
||||
"vimKeybinds": true,
|
||||
"commands": {
|
||||
"logout": [
|
||||
"loginctl",
|
||||
"terminate-user",
|
||||
""
|
||||
],
|
||||
"shutdown": [
|
||||
"systemctl",
|
||||
"poweroff"
|
||||
],
|
||||
"hibernate": [
|
||||
"systemctl",
|
||||
"hibernate"
|
||||
],
|
||||
"reboot": [
|
||||
"systemctl",
|
||||
"reboot"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,6 +40,7 @@
|
||||
(speaker)
|
||||
(temperature)
|
||||
(battery)
|
||||
(ram)
|
||||
(box :class "thingy" (systray :orientation "v"))
|
||||
(color_scheme)
|
||||
(xwayland)
|
||||
@ -138,6 +139,21 @@
|
||||
(label :text "${current_temp / 1000}°")
|
||||
))
|
||||
|
||||
(defwidget ram []
|
||||
(box :orientation "v"
|
||||
:valign "end"
|
||||
:class "thingy"
|
||||
(label :text "RAM")
|
||||
(circular-progress
|
||||
:thickness 4.0
|
||||
:value {EWW_RAM.used_mem_perc}
|
||||
:class {
|
||||
EWW_RAM?.used_mem_perc > 80 ? "battery-gauge low" :
|
||||
"battery-gauge"
|
||||
}
|
||||
)
|
||||
))
|
||||
|
||||
(defwidget battery []
|
||||
(box :orientation "v"
|
||||
:valign "end"
|
||||
|
||||
23
tree/.config/fuzzel/fuzzel.ini
Normal file
23
tree/.config/fuzzel/fuzzel.ini
Normal file
@ -0,0 +1,23 @@
|
||||
icon-theme=hicolor
|
||||
lines=10
|
||||
prompt="▶ "
|
||||
width=32
|
||||
font=FiraSans,Sans:size=18
|
||||
line-height=27
|
||||
|
||||
[colors]
|
||||
# akira pink
|
||||
text=e0c1c1ff
|
||||
|
||||
background=151515aa
|
||||
selection=282a36ff
|
||||
|
||||
match=ebebebff
|
||||
selection-match=ffffffff
|
||||
|
||||
selection-text=d4d4d4ff
|
||||
border=f65d76ff
|
||||
|
||||
[border]
|
||||
width=3
|
||||
radius=24
|
||||
@ -1,2 +1,4 @@
|
||||
{% if hostname != "pinenote" %}
|
||||
[Settings]
|
||||
gtk-application-prefer-dark-theme = true
|
||||
{% end %}
|
||||
@ -1,2 +1,5 @@
|
||||
{% if hostname != "pinenote" %}
|
||||
[Settings]
|
||||
gtk-application-prefer-dark-theme = true
|
||||
{% end %}
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
theme = "gruvbox"
|
||||
|
||||
[editor]
|
||||
auto-format = true
|
||||
#line-number = "relative"
|
||||
|
||||
[editor.cursor-shape]
|
||||
insert = "bar"
|
||||
normal = "block"
|
||||
select = "underline"
|
||||
21
tree/.config/helix/config.toml.tpl
Normal file
21
tree/.config/helix/config.toml.tpl
Normal file
@ -0,0 +1,21 @@
|
||||
{% if light %}
|
||||
theme = "gruvbox_light"
|
||||
{% else %}
|
||||
theme = "gruvbox"
|
||||
{% end %}
|
||||
|
||||
[editor]
|
||||
auto-format = true
|
||||
#line-number = "relative"
|
||||
|
||||
[editor.cursor-shape]
|
||||
insert = "bar"
|
||||
normal = "block"
|
||||
select = "underline"
|
||||
|
||||
[keys.select]
|
||||
X = "extend_line_above" # Extend the selection with the line above the selection
|
||||
|
||||
[keys.normal]
|
||||
X = "extend_line_above" # Extend the selection with the line above the selection
|
||||
C-n = "extend_search_next" # Add next search result to selection
|
||||
@ -1,2 +1,6 @@
|
||||
[[language]]
|
||||
name = "rust"
|
||||
diagnostic-severity = "info" # don't show hints
|
||||
|
||||
[language-server.qmlls]
|
||||
command = "qmlls6"
|
||||
|
||||
|
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 156 KiB |
@ -6,12 +6,10 @@ general {
|
||||
background {
|
||||
monitor =
|
||||
|
||||
{% if hostname == "sputnik" %}
|
||||
# make background transparent, used in combination with screenlock-video
|
||||
color = rgba(00000000)
|
||||
{% else %}
|
||||
#color = rgba(00000000)
|
||||
|
||||
path = ~/.config/wallpapers/6000x3376/akira.jpg
|
||||
{% end %}
|
||||
}
|
||||
|
||||
input-field {
|
||||
@ -53,7 +51,7 @@ input-field {
|
||||
# ferris image in the center
|
||||
image {
|
||||
monitor =
|
||||
path = ~/.config/wallpapers/ferris-stamp.png
|
||||
path = ~/.config/hypr/ferris-stamp.png
|
||||
rounding = 0
|
||||
size = 300
|
||||
position = 0, 0
|
||||
|
||||
@ -5,6 +5,8 @@
|
||||
|
||||
environment {
|
||||
DISPLAY ":0"
|
||||
ELECTRON_OZONE_PLATFORM_HINT "auto"
|
||||
QT_QPA_PLATFORMTHEME "qt5ct"
|
||||
}
|
||||
|
||||
// https://github.com/YaLTeR/niri/wiki/Configuration:-Input
|
||||
@ -20,17 +22,35 @@ input {
|
||||
|
||||
// Focus windows and outputs automatically when moving the mouse into them.
|
||||
focus-follows-mouse max-scroll-amount="0%"
|
||||
|
||||
{% if hostname == "sputnik" %}
|
||||
tablet {
|
||||
map-to-output "Microstep MSI MAG342CQR DB6H262101804"
|
||||
}
|
||||
{% end %}
|
||||
}
|
||||
|
||||
// https://gdthub.com/YaLTeR/niri/wiki/Configuration:-Outputs
|
||||
clipboard {
|
||||
disable-primary // disable middle-click paste
|
||||
}
|
||||
|
||||
// https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
|
||||
// `niri msg outputs`
|
||||
output "Microstep MSI MAG342CQR DB6H262101804" {
|
||||
mode "3440x1440@144.000"
|
||||
position x=0 y=0
|
||||
position x=1152 y=387
|
||||
scale 1.25
|
||||
}
|
||||
|
||||
output "Dell Inc. DELL U2724DE 1MV5L04" {
|
||||
mode "2560x1440@120.000"
|
||||
position x=0 y=0
|
||||
transform "270"
|
||||
scale 1.25
|
||||
|
||||
// layout {
|
||||
// gaps 0
|
||||
// }
|
||||
}
|
||||
|
||||
output "eDP-1" {
|
||||
@ -47,7 +67,23 @@ output "DP-2" {
|
||||
// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
|
||||
layout {
|
||||
// Set gaps around windows in logical pixels.
|
||||
{% if hostname == "sputnik" %}
|
||||
gaps 2 // TODO: fix output-specific layout
|
||||
{% else %}
|
||||
gaps 12
|
||||
{% end %}
|
||||
|
||||
// Struts shrink the area occupied by windows, similarly to layer-shell panels.
|
||||
// You can think of them as a kind of outer gaps. They are set in logical pixls.
|
||||
// Left and right struts will cause the next window to the side to always be visible.
|
||||
// Top and bottom struts will simply add outer gaps in addition to the area occupied by
|
||||
// layer-shell panels and regular gaps.
|
||||
struts {
|
||||
left -12
|
||||
right -12
|
||||
top -12
|
||||
bottom -12
|
||||
}
|
||||
|
||||
// When to center a column when changing focus, options are:
|
||||
// - "never", default behavior, focusing an off-screen column will keep at the left
|
||||
@ -74,6 +110,10 @@ layout {
|
||||
off
|
||||
}
|
||||
|
||||
shadow {
|
||||
on
|
||||
}
|
||||
|
||||
// You can also add a border. It's similar to the focus ring, but always visible.
|
||||
border {
|
||||
// The settings are the same as for the focus ring.
|
||||
@ -85,26 +125,11 @@ layout {
|
||||
// active-gradient from="#ffbb66" to="#ffc880" angle=45 relative-to="workspace-view"
|
||||
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
|
||||
}
|
||||
|
||||
// Struts shrink the area occupied by windows, similarly to layer-shell panels.
|
||||
// You can think of them as a kind of outer gaps. They are set in logical pixls.
|
||||
// Left and right struts will cause the next window to the side to always be visible.
|
||||
// Top and bottom struts will simply add outer gaps in addition to the area occupied by
|
||||
// layer-shell panels and regular gaps.
|
||||
struts {
|
||||
// left 64
|
||||
// right 64
|
||||
// top 64
|
||||
// bottom 64
|
||||
}
|
||||
}
|
||||
|
||||
spawn-at-startup "hyprpaper"
|
||||
spawn-at-startup "eww" "daemon"
|
||||
spawn-at-startup "eww" "open" "bar0"
|
||||
spawn-at-startup "eww" "open" "bar1"
|
||||
spawn-at-startup "swayidle" "-w" // ~/.config/swayidle/config
|
||||
spawn-at-startup "swaync" // ~/.config/swaync
|
||||
spawn-at-startup "qs" "-p" "/etc/quickshell/niri-caelestia-shell"
|
||||
|
||||
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
|
||||
// If the client will specifically ask for CSD, the request will be honored.
|
||||
@ -231,10 +256,33 @@ vec4 close_color(vec3 coords_geo, vec3 size_geo) {
|
||||
// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
|
||||
|
||||
window-rule {
|
||||
geometry-corner-radius 16
|
||||
geometry-corner-radius 22
|
||||
clip-to-geometry true
|
||||
}
|
||||
|
||||
// Indicate screencasted windows with red colors.
|
||||
window-rule {
|
||||
match is-window-cast-target=true
|
||||
|
||||
focus-ring {
|
||||
active-color "#f38ba8"
|
||||
inactive-color "#7d0d2d"
|
||||
}
|
||||
|
||||
border {
|
||||
inactive-color "#7d0d2d"
|
||||
}
|
||||
|
||||
shadow {
|
||||
color "#7d0d2d70"
|
||||
}
|
||||
|
||||
tab-indicator {
|
||||
active-color "#f38ba8"
|
||||
inactive-color "#7d0d2d"
|
||||
}
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match title="Volume Indicator"
|
||||
geometry-corner-radius 35
|
||||
@ -265,6 +313,12 @@ window-rule {
|
||||
//max-width 400
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id="com.nextcloud.desktopclient.nextcloud"
|
||||
open-floating true
|
||||
default-floating-position x=5 y=10 relative-to="bottom-left"
|
||||
}
|
||||
|
||||
binds {
|
||||
// Keys consist of modifiers separated by + signs, followed by an XKB key name
|
||||
// in the end. To find an XKB name for a particular key, you may use a program
|
||||
@ -280,9 +334,11 @@ binds {
|
||||
// shows a list of important hotkeys.
|
||||
Mod+Shift+Plus { show-hotkey-overlay; }
|
||||
|
||||
Mod+Return { spawn "alacritty"; }
|
||||
Mod+D { spawn "fuzzel"; }
|
||||
Mod+Plus { spawn "loginctl lock-session"; }
|
||||
Mod+Return { spawn "ghostty"; }
|
||||
Mod+Plus { spawn "loginctl" "lock-session"; }
|
||||
|
||||
// TODO: why do i have to use spawn-sh?
|
||||
Mod+D { spawn "qs" "-p" "/etc/quickshell/niri-caelestia-shell" "ipc" "call" "drawers" "toggle" "launcher"; }
|
||||
|
||||
// You can also use a shell:
|
||||
// Mod+T { spawn "bash" "-c" "notify-send hello && exec alacritty"; }
|
||||
@ -342,14 +398,6 @@ binds {
|
||||
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
|
||||
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
|
||||
|
||||
// Alternatively, there are commands to move just a single window:
|
||||
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
|
||||
// ...
|
||||
|
||||
// And you can also move a whole workspace to another monitor:
|
||||
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
|
||||
// ...
|
||||
|
||||
Mod+Page_Down { focus-workspace-down; }
|
||||
Mod+Page_Up { focus-workspace-up; }
|
||||
Mod+U { focus-workspace-down; }
|
||||
@ -359,15 +407,13 @@ binds {
|
||||
Mod+Ctrl+U { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+I { move-column-to-workspace-up; }
|
||||
|
||||
// Alternatively, there are commands to move just a single window:
|
||||
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
|
||||
// ...
|
||||
|
||||
Mod+Shift+Page_Down { move-workspace-down; }
|
||||
Mod+Shift+Page_Up { move-workspace-up; }
|
||||
Mod+Shift+U { move-workspace-down; }
|
||||
Mod+Shift+I { move-workspace-up; }
|
||||
|
||||
Mod+Backspace { toggle-overview; }
|
||||
|
||||
// You can bind mouse wheel scroll ticks using the following syntax.
|
||||
// These binds will change direction based on the natural-scroll setting.
|
||||
//
|
||||
@ -435,6 +481,7 @@ binds {
|
||||
|
||||
Mod+Comma { consume-window-into-column; }
|
||||
Mod+Period { expel-window-from-column; }
|
||||
Mod+W { toggle-column-tabbed-display; }
|
||||
|
||||
// There are also commands that consume or expel a single window to the side.
|
||||
// Mod+BracketLeft { consume-or-expel-window-left; }
|
||||
@ -481,4 +528,14 @@ binds {
|
||||
// Powers off the monitors. To turn them back on, do any input like
|
||||
// moving the mouse or pressing any other key.
|
||||
// Mod+Shift+P { power-off-monitors; }
|
||||
|
||||
// Dynamic screencasting target
|
||||
Mod+Slash { clear-dynamic-cast-target; }
|
||||
Mod+Ctrl+Slash { set-dynamic-cast-window; }
|
||||
Mod+Shift+Slash { set-dynamic-cast-monitor; }
|
||||
|
||||
// Debugging
|
||||
Mod+Shift+Ctrl+T { toggle-debug-tint; }
|
||||
Mod+Shift+Ctrl+O { debug-toggle-opaque-regions; }
|
||||
Mod+Shift+Ctrl+D { debug-toggle-damage; }
|
||||
}
|
||||
|
||||
@ -7,22 +7,18 @@
|
||||
# And here is the theme collection
|
||||
# https://github.com/nushell/nu_scripts/tree/main/themes
|
||||
|
||||
|
||||
# Use fish for external completion
|
||||
let fish_completer = {|spans|
|
||||
# if the current command is an alias, get it's expansion
|
||||
let expanded_alias = (scope aliases | where name == $spans.0 | get -i 0 | get -i expansion)
|
||||
|
||||
# overwrite
|
||||
let spans = (if $expanded_alias != null {
|
||||
# put the first word of the expanded alias first in the span
|
||||
$spans | skip 1 | prepend ($expanded_alias | split row " " | take 1)
|
||||
} else { $spans })
|
||||
|
||||
|
||||
fish --command $'complete "--do-complete=($spans | str join " ")"'
|
||||
| $"value(char tab)description(char newline)" + $in
|
||||
| from tsv --flexible --no-infer
|
||||
fish --command $"complete '--do-complete=($spans | str replace --all "'" "\\'" | str join ' ')'"
|
||||
| from tsv --flexible --noheaders --no-infer
|
||||
| rename value description
|
||||
| update value {|row|
|
||||
let value = $row.value
|
||||
let need_quote = ['\' ',' '[' ']' '(' ')' ' ' '\t' "'" '"' "`"] | any {$in in $value}
|
||||
if ($need_quote and ($value | path exists)) {
|
||||
let expanded_path = if ($value starts-with ~) {$value | path expand --no-symlink} else {$value}
|
||||
$'"($expanded_path | str replace --all "\"" "\\\"")"'
|
||||
} else {$value}
|
||||
}
|
||||
}
|
||||
|
||||
source theme.nu
|
||||
@ -682,6 +678,10 @@ alias xo = xdg-open
|
||||
source ~/.local/nu/readelf.nu
|
||||
source ~/.local/nu/mullvad.nu
|
||||
source ~/.local/nu/git.nu
|
||||
source ~/.local/nu/tailscale.nu
|
||||
{% if os == "darwin" %}
|
||||
source ~/.local/nu/macos.nu
|
||||
{% end %}
|
||||
|
||||
# init zoxide
|
||||
source ~/.cache/zoxide.nu
|
||||
@ -87,6 +87,7 @@ $env.PATH = ($env.PATH | split row (char esep) | prepend [
|
||||
($env.HOME + "/.cargo/bin"),
|
||||
($env.HOME + "/.radicle/bin"),
|
||||
($env.HOME + "/.volta/bin"),
|
||||
($env.HOME + "/.orbstack/bin"), # docker on macos
|
||||
])
|
||||
|
||||
# auto-detect which ssh-agent to use
|
||||
@ -100,7 +101,7 @@ if ("XDG_RUNTIME_DIR" in $env) {
|
||||
|
||||
$env.GPG_TTY = (tty)
|
||||
$env.BROWSER = "firefox"
|
||||
$env.EDITOR = "nvim"
|
||||
$env.EDITOR = "helix"
|
||||
$env.DEFMT_LOG = "info"
|
||||
$env.MOZ_ENABLE_WAYLAND = "1"
|
||||
$env.VOLTA_HOME = $"($env.HOME)/.volta"
|
||||
|
||||
@ -5,60 +5,67 @@ vim.g.localleader = "\\"
|
||||
-- Install Lazy
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- TODO: get colored renders working
|
||||
vim.g.rustaceanvim = {
|
||||
-- Plugin configuration
|
||||
tools = {},
|
||||
-- Plugin configuration
|
||||
tools = {
|
||||
float_win_config = { border = 'rounded' },
|
||||
},
|
||||
|
||||
-- LSP configuration
|
||||
server = {
|
||||
on_attach = function(client, bufnr)
|
||||
vim.keymap.set('n', '<leader>lg', pick_rust_target,
|
||||
{ desc = "Pick Target (Rust)", buffer = bufnr })
|
||||
vim.keymap.set('n', "<leader>a", function() vim.cmd.RustLsp('codeAction') end,
|
||||
{ desc = "Code Action (Rust)", buffer = bufnr })
|
||||
vim.keymap.set('n', "<leader>e", function() vim.cmd.RustLsp('renderDiagnostic', 'current') end,
|
||||
{ desc = "Render Diagnostic", buffer = bufnr })
|
||||
end,
|
||||
default_settings = {
|
||||
['rust-analyzer'] = {
|
||||
checkOnSave = { overrideCommand = "cargo check --message-format=json-diagnostic-rendered-ansi" },
|
||||
},
|
||||
},
|
||||
settings = function(project_root)
|
||||
local ra = require('rustaceanvim.config.server')
|
||||
local settings = ra.load_rust_analyzer_settings(project_root, {
|
||||
settings_file_pattern = 'rust-analyzer.json'
|
||||
})
|
||||
-- LSP configuration
|
||||
server = {
|
||||
on_attach = function(client, bufnr)
|
||||
vim.keymap.set('n', '<leader>lg', pick_rust_target,
|
||||
{ desc = "Pick Target (Rust)", buffer = bufnr })
|
||||
vim.keymap.set('n', "<leader>a", function() vim.cmd.RustLsp('codeAction') end,
|
||||
{ desc = "Code Action (Rust)", buffer = bufnr })
|
||||
vim.keymap.set('n', "<leader>e", function() vim.cmd.RustLsp('renderDiagnostic', 'current') end,
|
||||
{ desc = "Render Diagnostic", buffer = bufnr })
|
||||
end,
|
||||
default_settings = {
|
||||
['rust-analyzer'] = {
|
||||
checkOnSave = true,
|
||||
check = {
|
||||
overrideCommand = {
|
||||
"cargo", "check", "--message-format=json-diagnostic-rendered-ansi",
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
settings = function(project_root)
|
||||
local ra = require('rustaceanvim.config.server')
|
||||
local settings = ra.load_rust_analyzer_settings(project_root, {
|
||||
settings_file_pattern = 'rust-analyzer.json'
|
||||
})
|
||||
|
||||
-- override default target (if `set_rust_target` has been called)
|
||||
local rust_target = vim.g["rust-analyzer-target"]
|
||||
if rust_target then
|
||||
settings["rust-analyzer"]["cargo"] = { target = rust_target }
|
||||
end
|
||||
-- override default target (if `set_rust_target` has been called)
|
||||
local rust_target = vim.g["rust-analyzer-target"]
|
||||
if rust_target then
|
||||
settings["rust-analyzer"]["cargo"] = { target = rust_target }
|
||||
end
|
||||
|
||||
vim.g["rust-analyzer-target-test"] = settings
|
||||
vim.g["rust-analyzer-target-test"] = settings
|
||||
|
||||
return settings
|
||||
end,
|
||||
},
|
||||
return settings
|
||||
end,
|
||||
},
|
||||
|
||||
-- DAP configuration
|
||||
dap = {},
|
||||
-- DAP configuration
|
||||
dap = {},
|
||||
}
|
||||
|
||||
|
||||
@ -82,120 +89,125 @@ local language_servers = {
|
||||
"wgsl_analyzer",
|
||||
}
|
||||
require("mason").setup({
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "",
|
||||
package_pending = "",
|
||||
package_uninstalled = "",
|
||||
},
|
||||
},
|
||||
ensure_installed = language_servers,
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "",
|
||||
package_pending = "",
|
||||
package_uninstalled = "",
|
||||
},
|
||||
},
|
||||
ensure_installed = language_servers,
|
||||
})
|
||||
require("mason-lspconfig").setup_handlers {
|
||||
-- rust_analyzer is managed by rustaceanvim
|
||||
['rust_analyzer'] = function() end
|
||||
require("mason-lspconfig").setup {
|
||||
automatic_enable = {
|
||||
exclude = {
|
||||
-- rust_analyzer is managed by rustaceanvim
|
||||
"rust_analyzer",
|
||||
}
|
||||
}
|
||||
}
|
||||
require("mason-lspconfig").setup()
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
for _,l in pairs(language_servers) do
|
||||
for _, l in pairs(language_servers) do
|
||||
lspconfig[l].setup {}
|
||||
end
|
||||
|
||||
require('dapui').setup();
|
||||
|
||||
local compare = require "cmp.config.compare"
|
||||
require('cmp').setup.filetype({ "rust" }, {
|
||||
sorting = {
|
||||
priority_weight = 2,
|
||||
comparators = {
|
||||
-- deprioritize `.box`, `.mut`, etc.
|
||||
require("cmp-rust").deprioritize_postfix,
|
||||
-- deprioritize `Borrow::borrow` and `BorrowMut::borrow_mut`
|
||||
require("cmp-rust").deprioritize_borrow,
|
||||
-- deprioritize `Deref::deref` and `DerefMut::deref_mut`
|
||||
require("cmp-rust").deprioritize_deref,
|
||||
-- deprioritize `Into::into`, `Clone::clone`, etc.
|
||||
require("cmp-rust").deprioritize_common_traits,
|
||||
compare.offset,
|
||||
compare.exact,
|
||||
compare.score,
|
||||
--compare.recently_used,
|
||||
compare.locality,
|
||||
compare.sort_text,
|
||||
compare.length,
|
||||
compare.order,
|
||||
},
|
||||
},
|
||||
sorting = {
|
||||
priority_weight = 2,
|
||||
comparators = {
|
||||
-- deprioritize `.box`, `.mut`, etc.
|
||||
require("cmp-rust").deprioritize_postfix,
|
||||
-- deprioritize `Borrow::borrow` and `BorrowMut::borrow_mut`
|
||||
require("cmp-rust").deprioritize_borrow,
|
||||
-- deprioritize `Deref::deref` and `DerefMut::deref_mut`
|
||||
require("cmp-rust").deprioritize_deref,
|
||||
-- deprioritize `Into::into`, `Clone::clone`, etc.
|
||||
require("cmp-rust").deprioritize_common_traits,
|
||||
compare.offset,
|
||||
compare.exact,
|
||||
compare.score,
|
||||
--compare.recently_used,
|
||||
compare.locality,
|
||||
compare.sort_text,
|
||||
compare.length,
|
||||
compare.order,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Format file on save
|
||||
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]]
|
||||
|
||||
-- Completion Plugin Setup
|
||||
local cmp = require'cmp'
|
||||
local cmp = require 'cmp'
|
||||
cmp.setup({
|
||||
-- Enable LSP snippets
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
-- Add tab support
|
||||
['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
||||
['<Tab>'] = cmp.mapping.select_next_item(),
|
||||
['<C-S-f>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
['<CR>'] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Insert,
|
||||
select = true,
|
||||
})
|
||||
},
|
||||
-- Installed sources:
|
||||
sources = {
|
||||
{ name = 'path' }, -- file paths
|
||||
{ name = 'nvim_lsp', keyword_length = 3 }, -- from language server
|
||||
{ name = 'nvim_lsp_signature_help'}, -- display function signatures with current parameter emphasized
|
||||
{ name = 'nvim_lua', keyword_length = 2 }, -- complete neovim's Lua runtime API such vim.lsp.*
|
||||
{ name = 'buffer', keyword_length = 2 }, -- source current buffer
|
||||
{ name = 'vsnip', keyword_length = 2 }, -- nvim-cmp source for vim-vsnip
|
||||
{ name = 'calc'}, -- source for math calculation
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
formatting = {
|
||||
fields = {'menu', 'abbr', 'kind'},
|
||||
format = function(entry, item)
|
||||
local menu_icon ={
|
||||
nvim_lsp = 'λ',
|
||||
vsnip = '⋗',
|
||||
buffer = 'Ω',
|
||||
path = '🖫',
|
||||
}
|
||||
item.menu = menu_icon[entry.source.name]
|
||||
return item
|
||||
end,
|
||||
},
|
||||
-- Enable LSP snippets
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
-- Add tab support
|
||||
['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
||||
['<Tab>'] = cmp.mapping.select_next_item(),
|
||||
['<C-S-f>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
['<CR>'] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Insert,
|
||||
select = true,
|
||||
})
|
||||
},
|
||||
-- Installed sources:
|
||||
sources = {
|
||||
{ name = 'path' }, -- file paths
|
||||
{ name = 'nvim_lsp', keyword_length = 3 }, -- from language server
|
||||
{ name = 'nvim_lsp_signature_help' }, -- display function signatures with current parameter emphasized
|
||||
{ name = 'nvim_lua', keyword_length = 2 }, -- complete neovim's Lua runtime API such vim.lsp.*
|
||||
{ name = 'buffer', keyword_length = 2 }, -- source current buffer
|
||||
{ name = 'vsnip', keyword_length = 2 }, -- nvim-cmp source for vim-vsnip
|
||||
{ name = 'calc' }, -- source for math calculation
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
formatting = {
|
||||
fields = { 'menu', 'abbr', 'kind' },
|
||||
format = function(entry, item)
|
||||
local menu_icon = {
|
||||
nvim_lsp = 'λ',
|
||||
vsnip = '⋗',
|
||||
buffer = 'Ω',
|
||||
path = '🖫',
|
||||
}
|
||||
item.menu = menu_icon[entry.source.name]
|
||||
return item
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
-- Treesitter Plugin Setup
|
||||
-- Treesitter Plugin Setup
|
||||
require('nvim-treesitter.configs').setup {
|
||||
ensure_installed = { "lua", "rust", "toml" },
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting=false,
|
||||
},
|
||||
ident = { enable = true },
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true,
|
||||
max_file_lines = nil,
|
||||
}
|
||||
ensure_installed = { "lua", "rust", "toml" },
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
ident = { enable = true },
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true,
|
||||
max_file_lines = nil,
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,115 +4,115 @@ local codelldb_bin = "/usr/bin/codelldb"
|
||||
|
||||
-- Rust, C++, C
|
||||
dap.adapters.codelldb = {
|
||||
type = 'server',
|
||||
port = "${port}",
|
||||
executable = {
|
||||
command = codelldb_bin,
|
||||
args = {"--port", "${port}"},
|
||||
}
|
||||
type = 'server',
|
||||
port = "${port}",
|
||||
executable = {
|
||||
command = codelldb_bin,
|
||||
args = { "--port", "${port}" },
|
||||
}
|
||||
}
|
||||
|
||||
local function get_default_rust_program_path()
|
||||
local workspace = vim.fn.getcwd()
|
||||
local program_name = vim.fn.fnamemodify(workspace, ":t")
|
||||
return workspace .. '/target/debug/' .. program_name
|
||||
local workspace = vim.fn.getcwd()
|
||||
local program_name = vim.fn.fnamemodify(workspace, ":t")
|
||||
return workspace .. '/target/debug/' .. program_name
|
||||
end
|
||||
|
||||
dap.configurations.cpp = {
|
||||
{
|
||||
port = 1234,
|
||||
host = '127.0.0.1',
|
||||
name = "Attach to name",
|
||||
type = "codelldb",
|
||||
request = "attach",
|
||||
pid = function()
|
||||
-- Lets user enter the name of a running process instead of looking up the pid themselves
|
||||
local name = vim.fn.input('Enter pidof name: ')
|
||||
local handle = io.popen("pidof " .. name)
|
||||
local pid = handle:read("*a")
|
||||
handle:close()
|
||||
{
|
||||
port = 1234,
|
||||
host = '127.0.0.1',
|
||||
name = "Attach to name",
|
||||
type = "codelldb",
|
||||
request = "attach",
|
||||
pid = function()
|
||||
-- Lets user enter the name of a running process instead of looking up the pid themselves
|
||||
local name = vim.fn.input('Enter pidof name: ')
|
||||
local handle = io.popen("pidof " .. name)
|
||||
local pid = handle:read("*a")
|
||||
handle:close()
|
||||
|
||||
-- Trim the result
|
||||
pid = pid:match( "^%s*(.-)%s*$" )
|
||||
return pid
|
||||
end,
|
||||
stopOnEntry = true,
|
||||
},
|
||||
{
|
||||
port = 1234,
|
||||
host = '127.0.0.1',
|
||||
name = "Attach to PID",
|
||||
type = "codelldb",
|
||||
request = "attach",
|
||||
pid = function()
|
||||
return tonumber(vim.fn.input('Enter PID: '))
|
||||
end,
|
||||
stopOnEntry = true,
|
||||
},
|
||||
{
|
||||
port = 1234,
|
||||
host = '127.0.0.1',
|
||||
name = "Manually launch file",
|
||||
type = "codelldb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||
end,
|
||||
cwd = '${workspaceFolder}',
|
||||
stopOnEntry = true,
|
||||
},
|
||||
{
|
||||
-- To debug programs that need to run as root you can run a remote lldb-server as root
|
||||
-- sudo lldb-server platform --server --listen '*:1234'
|
||||
name = "Remote attach to name",
|
||||
type = "codelldb",
|
||||
request = "attach",
|
||||
pid = function()
|
||||
-- Lets user enter the name of a running process instead of looking up the pid themselves
|
||||
local name = vim.fn.input('Enter pidof name: ')
|
||||
local handle = io.popen("pidof " .. name)
|
||||
local pid = handle:read("*a")
|
||||
handle:close()
|
||||
-- Trim the result
|
||||
pid = pid:match("^%s*(.-)%s*$")
|
||||
return pid
|
||||
end,
|
||||
stopOnEntry = true,
|
||||
},
|
||||
{
|
||||
port = 1234,
|
||||
host = '127.0.0.1',
|
||||
name = "Attach to PID",
|
||||
type = "codelldb",
|
||||
request = "attach",
|
||||
pid = function()
|
||||
return tonumber(vim.fn.input('Enter PID: '))
|
||||
end,
|
||||
stopOnEntry = true,
|
||||
},
|
||||
{
|
||||
port = 1234,
|
||||
host = '127.0.0.1',
|
||||
name = "Manually launch file",
|
||||
type = "codelldb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||
end,
|
||||
cwd = '${workspaceFolder}',
|
||||
stopOnEntry = true,
|
||||
},
|
||||
{
|
||||
-- To debug programs that need to run as root you can run a remote lldb-server as root
|
||||
-- sudo lldb-server platform --server --listen '*:1234'
|
||||
name = "Remote attach to name",
|
||||
type = "codelldb",
|
||||
request = "attach",
|
||||
pid = function()
|
||||
-- Lets user enter the name of a running process instead of looking up the pid themselves
|
||||
local name = vim.fn.input('Enter pidof name: ')
|
||||
local handle = io.popen("pidof " .. name)
|
||||
local pid = handle:read("*a")
|
||||
handle:close()
|
||||
|
||||
-- Trim the result
|
||||
pid = pid:match( "^%s*(.-)%s*$" )
|
||||
return pid
|
||||
end,
|
||||
initCommands = {
|
||||
"platform select remote-linux",
|
||||
"platform connect connect://127.0.0.1:1234",
|
||||
"settings set target.inherit-env false",
|
||||
},
|
||||
},
|
||||
{
|
||||
-- To debug programs that need to run as root you can run a remote lldb-server as root
|
||||
-- sudo lldb-server platform --server --listen '*:1234'
|
||||
name = "Remote launch",
|
||||
type = "codelldb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||
end,
|
||||
initCommands = {
|
||||
"platform select remote-linux",
|
||||
"platform connect connect://127.0.0.1:1234",
|
||||
"settings set target.inherit-env false",
|
||||
},
|
||||
},
|
||||
-- Trim the result
|
||||
pid = pid:match("^%s*(.-)%s*$")
|
||||
return pid
|
||||
end,
|
||||
initCommands = {
|
||||
"platform select remote-linux",
|
||||
"platform connect connect://127.0.0.1:1234",
|
||||
"settings set target.inherit-env false",
|
||||
},
|
||||
},
|
||||
{
|
||||
-- To debug programs that need to run as root you can run a remote lldb-server as root
|
||||
-- sudo lldb-server platform --server --listen '*:1234'
|
||||
name = "Remote launch",
|
||||
type = "codelldb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||
end,
|
||||
initCommands = {
|
||||
"platform select remote-linux",
|
||||
"platform connect connect://127.0.0.1:1234",
|
||||
"settings set target.inherit-env false",
|
||||
},
|
||||
},
|
||||
}
|
||||
dap.configurations.c = dap.configurations.cpp
|
||||
dap.configurations.rust = dap.configurations.cpp
|
||||
|
||||
-- Insert this config as a rust specific one before the C++ configs
|
||||
table.insert(dap.configurations.rust, 1, {
|
||||
port = 1234,
|
||||
host = '127.0.0.1',
|
||||
name = "Launch Default Rust Program",
|
||||
type = "codelldb",
|
||||
request = "launch",
|
||||
program = get_default_rust_program_path,
|
||||
cwd = '${workspaceFolder}',
|
||||
stopOnEntry = true,
|
||||
port = 1234,
|
||||
host = '127.0.0.1',
|
||||
name = "Launch Default Rust Program",
|
||||
type = "codelldb",
|
||||
request = "launch",
|
||||
program = get_default_rust_program_path,
|
||||
cwd = '${workspaceFolder}',
|
||||
stopOnEntry = true,
|
||||
})
|
||||
|
||||
-- Python
|
||||
|
||||
@ -1,47 +1,132 @@
|
||||
local telescope = require('telescope.builtin')
|
||||
local wk = require('which-key')
|
||||
local harpoon = require("harpoon")
|
||||
local telescope_conf = require("telescope.config").values
|
||||
harpoon:setup()
|
||||
|
||||
vim.keymap.set('n', '<leader>f', telescope.find_files, { desc = "File picker" })
|
||||
vim.keymap.set('n', '<leader>g', telescope.live_grep, { desc = "Grep recursively" })
|
||||
vim.keymap.set('n', '<leader>b', telescope.buffers, { desc = "Buffer picker" })
|
||||
vim.keymap.set('n', '<leader>?', telescope.help_tags, { desc = "Help tags picker" })
|
||||
vim.keymap.set('n', '<leader>s', telescope.treesitter, { desc = "Treesitter symbol picker" })
|
||||
vim.keymap.set('n', '<leader>j', telescope.jumplist, { desc = "Jumplist" })
|
||||
vim.keymap.set('n', '<leader>u', ":TodoTelescope<Enter>", { desc = "Grep for TODOs" })
|
||||
vim.keymap.set('n', 'U', ":redo<Enter>", {})
|
||||
vim.keymap.set('n', '<leader>p', ":b#<Enter>", { desc = "Go to last buffer" })
|
||||
|
||||
|
||||
|
||||
local function toggle_telescope(harpoon_files)
|
||||
local displayer = require("telescope.pickers.entry_display").create({
|
||||
separator = " | ",
|
||||
items = {
|
||||
--{ width = 0.1 },
|
||||
{ width = 0.9 },
|
||||
}
|
||||
})
|
||||
|
||||
local harpoons = {}
|
||||
for _, item in ipairs(harpoon_files.items) do
|
||||
table.insert(harpoons, {
|
||||
filepath = item.value,
|
||||
col = item.context.col,
|
||||
row = item.context.row,
|
||||
})
|
||||
end
|
||||
|
||||
require("telescope.pickers").new({}, {
|
||||
prompt_title = "Harpoon",
|
||||
finder = require("telescope.finders").new_table({
|
||||
results = harpoons,
|
||||
entry_maker = function(entry)
|
||||
--vim.print("mapping entry")
|
||||
--vim.print(entry)
|
||||
local filepath_with_row = string.format("%s:%d", entry.filepath, entry.row)
|
||||
return {
|
||||
-- Value to display. Required. type=any
|
||||
--value = { "foo", entry.filepath, },
|
||||
value = entry,
|
||||
|
||||
-- Whether to display the entry. Optional. type=bool
|
||||
valid = true,
|
||||
|
||||
-- Optional. type=string|function
|
||||
--display = entry.filepath,
|
||||
display = function(entry)
|
||||
return displayer({
|
||||
-- NOTE: the number of elements must match the
|
||||
-- configuration passed to `displayer` above
|
||||
--{ "foobar" },
|
||||
{ filepath_with_row }
|
||||
})
|
||||
end,
|
||||
|
||||
-- Used for filtering. Optional. type=string
|
||||
ordinal = filepath_with_row,
|
||||
|
||||
-- File to open when pressing enter. Optional. type=string
|
||||
filename = entry.filepath,
|
||||
|
||||
-- Buffer to open when pressing enter. Optional. type=number
|
||||
-- bufnr = 0,
|
||||
|
||||
-- Line number of file/buffer to open. Optional. type=number
|
||||
lnum = entry.row,
|
||||
|
||||
-- Line number of file/buffer to open. Optional. type=number
|
||||
col = entry.row,
|
||||
}
|
||||
end
|
||||
}),
|
||||
previewer = telescope_conf.grep_previewer({}),
|
||||
sorter = telescope_conf.generic_sorter({}),
|
||||
}):find()
|
||||
end
|
||||
vim.keymap.set("n", "<leader>h", function() toggle_telescope(harpoon:list()) end,
|
||||
{ desc = "Open harpoon window" })
|
||||
vim.keymap.set("n", "<leader>H", function() harpoon:list():add() end,
|
||||
{ desc = "Launch harpoon" })
|
||||
-- Toggle previous & next buffers stored within Harpoon list
|
||||
--vim.keymap.set("n", "<C-S-P>", function() harpoon:list():prev() end)
|
||||
--vim.keymap.set("n", "<C-S-N>", function() harpoon:list():next() end)
|
||||
|
||||
|
||||
-- Use LspAttach autocommand to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
||||
callback = function(ev)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
|
||||
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
||||
callback = function(ev)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
|
||||
|
||||
-- Buffer local mappings.
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
vim.keymap.set('n', '<leader>ld', telescope.lsp_definitions, { desc = "Show definitons", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>lr', telescope.lsp_references, { desc = "Show references", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>li', telescope.lsp_implementations, { desc = "Show implementations", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>lt', telescope.lsp_type_definitions, { desc = "Show type definitions", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>le', telescope.diagnostics, { desc = "Show diagnostics", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>ls', telescope.lsp_workspace_symbols, { desc = "Show workspace symbols", buffer = ev.buf })
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, { buffer = ev.buf })
|
||||
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, { buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, { desc = "Add workspace folder", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, { desc = "Remove workspace folder", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>wl', function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end, { desc = "List workspace folders", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>r', vim.lsp.buf.rename, { desc = "Rename symbol", buffer = ev.buf })
|
||||
vim.keymap.set('n', "<leader>a", vim.lsp.buf.code_action, { desc = "Code Action", buffer = ev.buf })
|
||||
-- Buffer local mappings.
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
vim.keymap.set('n', '<leader>ld', telescope.lsp_definitions, { desc = "Show definitons", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>lr', telescope.lsp_references, { desc = "Show references", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>li', telescope.lsp_implementations,
|
||||
{ desc = "Show implementations", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>lt', telescope.lsp_type_definitions,
|
||||
{ desc = "Show type definitions", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>le', telescope.diagnostics, { desc = "Show diagnostics", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>ls', telescope.lsp_workspace_symbols,
|
||||
{ desc = "Show workspace symbols", buffer = ev.buf })
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, { buffer = ev.buf })
|
||||
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, { buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder,
|
||||
{ desc = "Add workspace folder", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder,
|
||||
{ desc = "Remove workspace folder", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>wl', function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end, { desc = "List workspace folders", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>r', vim.lsp.buf.rename, { desc = "Rename symbol", buffer = ev.buf })
|
||||
vim.keymap.set('n', "<leader>a", vim.lsp.buf.code_action, { desc = "Code Action", buffer = ev.buf })
|
||||
|
||||
wk.add({
|
||||
{ "<leader>l", desc = "Language server stuff" },
|
||||
{ "<leader>w", desc = "Workspace stuff" },
|
||||
})
|
||||
|
||||
end,
|
||||
wk.add({
|
||||
{ "<leader>l", desc = "Language server stuff" },
|
||||
{ "<leader>w", desc = "Workspace stuff" },
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
--local rust_tools = require("rust-tools")
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
@ -1,40 +1,40 @@
|
||||
local opt = vim.opt
|
||||
|
||||
-- Use system clipboard
|
||||
vim.opt.clipboard="unnamedplus"
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
|
||||
-- [[ Context ]]
|
||||
opt.colorcolumn = '100' -- str: Show col for max line length
|
||||
opt.number = true -- bool: Show line numbers
|
||||
opt.relativenumber = true -- bool: Show relative line numbers
|
||||
opt.scrolloff = 10 -- int: Min num lines of context
|
||||
opt.signcolumn = "yes" -- str: Show the sign column
|
||||
opt.colorcolumn = '100' -- str: Show col for max line length
|
||||
opt.number = true -- bool: Show line numbers
|
||||
opt.relativenumber = true -- bool: Show relative line numbers
|
||||
opt.scrolloff = 10 -- int: Min num lines of context
|
||||
opt.signcolumn = "yes" -- str: Show the sign column
|
||||
|
||||
-- [[ Filetypes ]]
|
||||
opt.encoding = 'utf8' -- str: String encoding to use
|
||||
opt.encoding = 'utf8' -- str: String encoding to use
|
||||
-- opt.fileencoding = 'utf8' -- str: File encoding to use
|
||||
vim.filetype.add({extension = {wgsl = "wgsl"}})
|
||||
vim.filetype.add({ extension = { wgsl = "wgsl" } })
|
||||
|
||||
-- [[ Theme ]]
|
||||
opt.syntax = "ON" -- str: Allow syntax highlighting
|
||||
opt.termguicolors = true -- bool: If term supports ui color then enable
|
||||
opt.syntax = "ON" -- str: Allow syntax highlighting
|
||||
opt.termguicolors = true -- bool: If term supports ui color then enable
|
||||
|
||||
-- [[ Search ]]
|
||||
opt.ignorecase = true -- bool: Ignore case in search patterns
|
||||
opt.smartcase = true -- bool: Override ignorecase if search contains capitals
|
||||
opt.incsearch = true -- bool: Use incremental search
|
||||
opt.hlsearch = false -- bool: Highlight search matches
|
||||
opt.ignorecase = true -- bool: Ignore case in search patterns
|
||||
opt.smartcase = true -- bool: Override ignorecase if search contains capitals
|
||||
opt.incsearch = true -- bool: Use incremental search
|
||||
opt.hlsearch = false -- bool: Highlight search matches
|
||||
|
||||
-- [[ Whitespace ]]
|
||||
-- opt.expandtab = true -- bool: Use spaces instead of tabs
|
||||
opt.shiftwidth = 4 -- num: Size of an indent
|
||||
opt.softtabstop = 4 -- num: Number of spaces tabs count for in insert mode
|
||||
opt.tabstop = 4 -- num: Number of spaces tabs count for
|
||||
opt.list = true -- show some whitespace
|
||||
opt.shiftwidth = 4 -- num: Size of an indent
|
||||
opt.softtabstop = 4 -- num: Number of spaces tabs count for in insert mode
|
||||
opt.tabstop = 4 -- num: Number of spaces tabs count for
|
||||
opt.list = true -- show some whitespace
|
||||
|
||||
-- [[ Splits ]]
|
||||
opt.splitright = true -- bool: Place new window to right of current one
|
||||
opt.splitbelow = true -- bool: Place new window below the current one
|
||||
opt.splitright = true -- bool: Place new window to right of current one
|
||||
opt.splitbelow = true -- bool: Place new window below the current one
|
||||
|
||||
--Set completeopt to have a better completion experience
|
||||
-- :help completeopt
|
||||
@ -43,11 +43,10 @@ opt.splitbelow = true -- bool: Place new window below the current one
|
||||
-- noselect: Do not select, force to select one from the menu
|
||||
-- shortness: avoid showing extra messages when using completion
|
||||
-- updatetime: set updatetime for CursorHold
|
||||
vim.opt.completeopt = {'menuone', 'noselect', 'noinsert'}
|
||||
vim.opt.shortmess = vim.opt.shortmess + { c = true}
|
||||
vim.opt.completeopt = { 'menuone', 'noselect', 'noinsert' }
|
||||
vim.opt.shortmess = vim.opt.shortmess + { c = true }
|
||||
vim.api.nvim_set_option('updatetime', 300)
|
||||
|
||||
-- Uncomment to enable treesitter folding by default
|
||||
--vim.wo.foldmethod = 'expr'
|
||||
--vim.wo.foldexpr = 'nvim_treesitter#foldexpr()'
|
||||
|
||||
|
||||
@ -1,98 +1,122 @@
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- install plugins
|
||||
{ 'nvim-treesitter/nvim-treesitter' },
|
||||
{ 'ellisonleao/gruvbox.nvim' },
|
||||
{ 'danilamihailov/beacon.nvim' },
|
||||
{ 'nvim-lua/plenary.nvim' },
|
||||
{
|
||||
'folke/todo-comments.nvim',
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = {
|
||||
keywords = {
|
||||
SAFETY = {
|
||||
icon = "☢",
|
||||
color = "warning",
|
||||
alt = { "SOUNDNESS", "UNSAFE", "UNSOUND" },
|
||||
},
|
||||
INVARIANT = {
|
||||
icon = "🦑",
|
||||
color = "hint",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
init = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
end,
|
||||
opts = {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
},
|
||||
},
|
||||
{ 'rktjmp/fwatch.nvim' },
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
opts = {
|
||||
bigfile = { enabled = true },
|
||||
notifier = { enabled = true },
|
||||
quickfile = { enabled = true },
|
||||
statuscolumn = { enabled = true },
|
||||
words = { enabled = true },
|
||||
},
|
||||
},
|
||||
spec = {
|
||||
-- install plugins
|
||||
{ 'nvim-treesitter/nvim-treesitter' },
|
||||
{ 'ellisonleao/gruvbox.nvim' },
|
||||
{ 'danilamihailov/beacon.nvim' },
|
||||
{ 'nvim-lua/plenary.nvim' },
|
||||
{
|
||||
'folke/todo-comments.nvim',
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = {
|
||||
keywords = {
|
||||
SAFETY = {
|
||||
icon = "☢",
|
||||
color = "warning",
|
||||
alt = { "SOUNDNESS", "UNSAFE", "UNSOUND" },
|
||||
},
|
||||
INVARIANT = {
|
||||
icon = "🦑",
|
||||
color = "hint",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
init = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
end,
|
||||
opts = {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
},
|
||||
},
|
||||
{ 'rktjmp/fwatch.nvim' },
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
opts = {
|
||||
bigfile = { enabled = true },
|
||||
notifier = { enabled = true },
|
||||
quickfile = { enabled = true },
|
||||
statuscolumn = { enabled = true },
|
||||
words = { enabled = true },
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/flash.nvim",
|
||||
event = "VeryLazy",
|
||||
---@type Flash.Config
|
||||
opts = {},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||
},
|
||||
},
|
||||
|
||||
-- -- language server stuff
|
||||
{ 'williamboman/mason.nvim' },
|
||||
{ 'williamboman/mason-lspconfig.nvim' },
|
||||
{ 'neovim/nvim-lspconfig' },
|
||||
{
|
||||
'mrcjkb/rustaceanvim',
|
||||
version = '^4',
|
||||
lazy = false, -- This plugin is already lazy
|
||||
},
|
||||
{ 'mfussenegger/nvim-dap' },
|
||||
-- -- language server stuff
|
||||
{ 'williamboman/mason.nvim' },
|
||||
{ 'williamboman/mason-lspconfig.nvim' },
|
||||
{ 'neovim/nvim-lspconfig' },
|
||||
{
|
||||
'mrcjkb/rustaceanvim',
|
||||
version = '^6',
|
||||
lazy = false, -- This plugin is already lazy
|
||||
},
|
||||
{ 'mfussenegger/nvim-dap' },
|
||||
{ 'rcarriga/nvim-dap-ui', dependencies = { 'mfussenegger/nvim-dap', 'nvim-neotest/nvim-nio' } },
|
||||
{ 'theHamsta/nvim-dap-virtual-text' },
|
||||
{ 'jay-babu/mason-nvim-dap.nvim' },
|
||||
|
||||
-- -- nushell support
|
||||
-- --use { 'LhKipp/nvim-nu', run = function() vim.fn[':TSInstall nu'] end} }
|
||||
{ 'LhKipp/nvim-nu' },
|
||||
-- -- nushell support
|
||||
-- --use { 'LhKipp/nvim-nu', run = function() vim.fn[':TSInstall nu'] end} }
|
||||
{ 'LhKipp/nvim-nu' },
|
||||
|
||||
-- -- Completion framework:
|
||||
{ 'hrsh7th/nvim-cmp' },
|
||||
-- -- Completion framework:
|
||||
{ 'hrsh7th/nvim-cmp' },
|
||||
|
||||
-- -- LSP completion source:
|
||||
{ 'hrsh7th/cmp-nvim-lsp' },
|
||||
-- -- LSP completion source:
|
||||
{ 'hrsh7th/cmp-nvim-lsp' },
|
||||
|
||||
-- -- Useful completion sources:
|
||||
{ 'hrsh7th/cmp-nvim-lua' },
|
||||
{ 'hrsh7th/cmp-nvim-lsp-signature-help' },
|
||||
{ 'hrsh7th/cmp-vsnip' },
|
||||
{ 'hrsh7th/cmp-path' },
|
||||
{ 'hrsh7th/cmp-buffer' },
|
||||
{ 'hrsh7th/vim-vsnip' },
|
||||
{ 'ryo33/nvim-cmp-rust' },
|
||||
-- -- Useful completion sources:
|
||||
{ 'hrsh7th/cmp-nvim-lua' },
|
||||
{ 'hrsh7th/cmp-nvim-lsp-signature-help' },
|
||||
{ 'hrsh7th/cmp-vsnip' },
|
||||
{ 'hrsh7th/cmp-path' },
|
||||
{ 'hrsh7th/cmp-buffer' },
|
||||
{ 'hrsh7th/vim-vsnip' },
|
||||
{ 'ryo33/nvim-cmp-rust' },
|
||||
|
||||
{ 'nvim-telescope/telescope.nvim', branch = '0.1.x',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' }
|
||||
},
|
||||
{
|
||||
'nvim-telescope/telescope.nvim',
|
||||
branch = '0.1.x',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' }
|
||||
},
|
||||
{
|
||||
"ThePrimeagen/harpoon",
|
||||
branch = "harpoon2",
|
||||
dependencies = { "nvim-lua/plenary.nvim" }
|
||||
},
|
||||
|
||||
-- -- status line
|
||||
{ 'linrongbin16/lsp-progress.nvim' },
|
||||
{ 'nvim-lualine/lualine.nvim' },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "habamax" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = {
|
||||
enabled = true,
|
||||
notify=false,
|
||||
},
|
||||
-- -- status line
|
||||
{ 'linrongbin16/lsp-progress.nvim' },
|
||||
{ 'nvim-lualine/lualine.nvim' },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "habamax" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = {
|
||||
enabled = true,
|
||||
notify = false,
|
||||
},
|
||||
})
|
||||
|
||||
@ -1,139 +1,139 @@
|
||||
return {
|
||||
braille = { "⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷" },
|
||||
triangles = { "◢", "◣", "◤", "◥" },
|
||||
dwarf_fortress = {
|
||||
" ██████£££ ",
|
||||
"☺██████£££ ",
|
||||
"☺██████£££ ",
|
||||
"☺▓█████£££ ",
|
||||
"☺▓█████£££ ",
|
||||
"☺▒█████£££ ",
|
||||
"☺▒█████£££ ",
|
||||
"☺░█████£££ ",
|
||||
"☺░█████£££ ",
|
||||
"☺ █████£££ ",
|
||||
" ☺█████£££ ",
|
||||
" ☺█████£££ ",
|
||||
" ☺▓████£££ ",
|
||||
" ☺▓████£££ ",
|
||||
" ☺▒████£££ ",
|
||||
" ☺▒████£££ ",
|
||||
" ☺░████£££ ",
|
||||
" ☺░████£££ ",
|
||||
" ☺ ████£££ ",
|
||||
" ☺████£££ ",
|
||||
" ☺████£££ ",
|
||||
" ☺▓███£££ ",
|
||||
" ☺▓███£££ ",
|
||||
" ☺▒███£££ ",
|
||||
" ☺▒███£££ ",
|
||||
" ☺░███£££ ",
|
||||
" ☺░███£££ ",
|
||||
" ☺ ███£££ ",
|
||||
" ☺███£££ ",
|
||||
" ☺███£££ ",
|
||||
" ☺▓██£££ ",
|
||||
" ☺▓██£££ ",
|
||||
" ☺▒██£££ ",
|
||||
" ☺▒██£££ ",
|
||||
" ☺░██£££ ",
|
||||
" ☺░██£££ ",
|
||||
" ☺ ██£££ ",
|
||||
" ☺██£££ ",
|
||||
" ☺██£££ ",
|
||||
" ☺▓█£££ ",
|
||||
" ☺▓█£££ ",
|
||||
" ☺▒█£££ ",
|
||||
" ☺▒█£££ ",
|
||||
" ☺░█£££ ",
|
||||
" ☺░█£££ ",
|
||||
" ☺ █£££ ",
|
||||
" ☺█£££ ",
|
||||
" ☺█£££ ",
|
||||
" ☺▓£££ ",
|
||||
" ☺▓£££ ",
|
||||
" ☺▒£££ ",
|
||||
" ☺▒£££ ",
|
||||
" ☺░£££ ",
|
||||
" ☺░£££ ",
|
||||
" ☺ £££ ",
|
||||
" ☺£££ ",
|
||||
" ☺£££ ",
|
||||
" ☺▓££ ",
|
||||
" ☺▓££ ",
|
||||
" ☺▒££ ",
|
||||
" ☺▒££ ",
|
||||
" ☺░££ ",
|
||||
" ☺░££ ",
|
||||
" ☺ ££ ",
|
||||
" ☺££ ",
|
||||
" ☺££ ",
|
||||
" ☺▓£ ",
|
||||
" ☺▓£ ",
|
||||
" ☺▒£ ",
|
||||
" ☺▒£ ",
|
||||
" ☺░£ ",
|
||||
" ☺░£ ",
|
||||
" ☺ £ ",
|
||||
" ☺£ ",
|
||||
" ☺£ ",
|
||||
" ☺▓ ",
|
||||
" ☺▓ ",
|
||||
" ☺▒ ",
|
||||
" ☺▒ ",
|
||||
" ☺░ ",
|
||||
" ☺░ ",
|
||||
" ☺ ",
|
||||
" ☺ &",
|
||||
" ☺ ☼&",
|
||||
" ☺ ☼ &",
|
||||
" ☺☼ &",
|
||||
" ☺☼ & ",
|
||||
" ‼ & ",
|
||||
" ☺ & ",
|
||||
" ‼ & ",
|
||||
" ☺ & ",
|
||||
" ‼ & ",
|
||||
" ☺ & ",
|
||||
"‼ & ",
|
||||
" & ",
|
||||
" & ",
|
||||
" & ░ ",
|
||||
" & ▒ ",
|
||||
" & ▓ ",
|
||||
" & £ ",
|
||||
" & ░£ ",
|
||||
" & ▒£ ",
|
||||
" & ▓£ ",
|
||||
" & ££ ",
|
||||
" & ░££ ",
|
||||
" & ▒££ ",
|
||||
"& ▓££ ",
|
||||
"& £££ ",
|
||||
" ░£££ ",
|
||||
" ▒£££ ",
|
||||
" ▓£££ ",
|
||||
" █£££ ",
|
||||
" ░█£££ ",
|
||||
" ▒█£££ ",
|
||||
" ▓█£££ ",
|
||||
" ██£££ ",
|
||||
" ░██£££ ",
|
||||
" ▒██£££ ",
|
||||
" ▓██£££ ",
|
||||
" ███£££ ",
|
||||
" ░███£££ ",
|
||||
" ▒███£££ ",
|
||||
" ▓███£££ ",
|
||||
" ████£££ ",
|
||||
" ░████£££ ",
|
||||
" ▒████£££ ",
|
||||
" ▓████£££ ",
|
||||
" █████£££ ",
|
||||
" ░█████£££ ",
|
||||
" ▒█████£££ ",
|
||||
" ▓█████£££ ",
|
||||
" ██████£££ ",
|
||||
" ██████£££ ",
|
||||
},
|
||||
braille = { "⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷" },
|
||||
triangles = { "◢", "◣", "◤", "◥" },
|
||||
dwarf_fortress = {
|
||||
" ██████£££ ",
|
||||
"☺██████£££ ",
|
||||
"☺██████£££ ",
|
||||
"☺▓█████£££ ",
|
||||
"☺▓█████£££ ",
|
||||
"☺▒█████£££ ",
|
||||
"☺▒█████£££ ",
|
||||
"☺░█████£££ ",
|
||||
"☺░█████£££ ",
|
||||
"☺ █████£££ ",
|
||||
" ☺█████£££ ",
|
||||
" ☺█████£££ ",
|
||||
" ☺▓████£££ ",
|
||||
" ☺▓████£££ ",
|
||||
" ☺▒████£££ ",
|
||||
" ☺▒████£££ ",
|
||||
" ☺░████£££ ",
|
||||
" ☺░████£££ ",
|
||||
" ☺ ████£££ ",
|
||||
" ☺████£££ ",
|
||||
" ☺████£££ ",
|
||||
" ☺▓███£££ ",
|
||||
" ☺▓███£££ ",
|
||||
" ☺▒███£££ ",
|
||||
" ☺▒███£££ ",
|
||||
" ☺░███£££ ",
|
||||
" ☺░███£££ ",
|
||||
" ☺ ███£££ ",
|
||||
" ☺███£££ ",
|
||||
" ☺███£££ ",
|
||||
" ☺▓██£££ ",
|
||||
" ☺▓██£££ ",
|
||||
" ☺▒██£££ ",
|
||||
" ☺▒██£££ ",
|
||||
" ☺░██£££ ",
|
||||
" ☺░██£££ ",
|
||||
" ☺ ██£££ ",
|
||||
" ☺██£££ ",
|
||||
" ☺██£££ ",
|
||||
" ☺▓█£££ ",
|
||||
" ☺▓█£££ ",
|
||||
" ☺▒█£££ ",
|
||||
" ☺▒█£££ ",
|
||||
" ☺░█£££ ",
|
||||
" ☺░█£££ ",
|
||||
" ☺ █£££ ",
|
||||
" ☺█£££ ",
|
||||
" ☺█£££ ",
|
||||
" ☺▓£££ ",
|
||||
" ☺▓£££ ",
|
||||
" ☺▒£££ ",
|
||||
" ☺▒£££ ",
|
||||
" ☺░£££ ",
|
||||
" ☺░£££ ",
|
||||
" ☺ £££ ",
|
||||
" ☺£££ ",
|
||||
" ☺£££ ",
|
||||
" ☺▓££ ",
|
||||
" ☺▓££ ",
|
||||
" ☺▒££ ",
|
||||
" ☺▒££ ",
|
||||
" ☺░££ ",
|
||||
" ☺░££ ",
|
||||
" ☺ ££ ",
|
||||
" ☺££ ",
|
||||
" ☺££ ",
|
||||
" ☺▓£ ",
|
||||
" ☺▓£ ",
|
||||
" ☺▒£ ",
|
||||
" ☺▒£ ",
|
||||
" ☺░£ ",
|
||||
" ☺░£ ",
|
||||
" ☺ £ ",
|
||||
" ☺£ ",
|
||||
" ☺£ ",
|
||||
" ☺▓ ",
|
||||
" ☺▓ ",
|
||||
" ☺▒ ",
|
||||
" ☺▒ ",
|
||||
" ☺░ ",
|
||||
" ☺░ ",
|
||||
" ☺ ",
|
||||
" ☺ &",
|
||||
" ☺ ☼&",
|
||||
" ☺ ☼ &",
|
||||
" ☺☼ &",
|
||||
" ☺☼ & ",
|
||||
" ‼ & ",
|
||||
" ☺ & ",
|
||||
" ‼ & ",
|
||||
" ☺ & ",
|
||||
" ‼ & ",
|
||||
" ☺ & ",
|
||||
"‼ & ",
|
||||
" & ",
|
||||
" & ",
|
||||
" & ░ ",
|
||||
" & ▒ ",
|
||||
" & ▓ ",
|
||||
" & £ ",
|
||||
" & ░£ ",
|
||||
" & ▒£ ",
|
||||
" & ▓£ ",
|
||||
" & ££ ",
|
||||
" & ░££ ",
|
||||
" & ▒££ ",
|
||||
"& ▓££ ",
|
||||
"& £££ ",
|
||||
" ░£££ ",
|
||||
" ▒£££ ",
|
||||
" ▓£££ ",
|
||||
" █£££ ",
|
||||
" ░█£££ ",
|
||||
" ▒█£££ ",
|
||||
" ▓█£££ ",
|
||||
" ██£££ ",
|
||||
" ░██£££ ",
|
||||
" ▒██£££ ",
|
||||
" ▓██£££ ",
|
||||
" ███£££ ",
|
||||
" ░███£££ ",
|
||||
" ▒███£££ ",
|
||||
" ▓███£££ ",
|
||||
" ████£££ ",
|
||||
" ░████£££ ",
|
||||
" ▒████£££ ",
|
||||
" ▓████£££ ",
|
||||
" █████£££ ",
|
||||
" ░█████£££ ",
|
||||
" ▒█████£££ ",
|
||||
" ▓█████£££ ",
|
||||
" ██████£££ ",
|
||||
" ██████£££ ",
|
||||
},
|
||||
}
|
||||
|
||||
@ -1,58 +1,58 @@
|
||||
require('lsp-progress').setup({
|
||||
spinner = require('spinners').dwarf_fortress,
|
||||
spin_update_time = 200,
|
||||
client_format = function(client_name, spinner, series_messages)
|
||||
return #series_messages > 0
|
||||
and (
|
||||
table.concat(series_messages, ", ")
|
||||
.. " " .. spinner
|
||||
.. " [" .. client_name .. "]"
|
||||
)
|
||||
or nil
|
||||
end,
|
||||
spinner = require('spinners').dwarf_fortress,
|
||||
spin_update_time = 200,
|
||||
client_format = function(client_name, spinner, series_messages)
|
||||
return #series_messages > 0
|
||||
and (
|
||||
table.concat(series_messages, ", ")
|
||||
.. " " .. spinner
|
||||
.. " [" .. client_name .. "]"
|
||||
)
|
||||
or nil
|
||||
end,
|
||||
})
|
||||
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'auto',
|
||||
component_separators = { left = '', right = ''},
|
||||
section_separators = { left = '', right = ''},
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 200,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
}
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {'mode'},
|
||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {
|
||||
function()
|
||||
return require('lsp-progress').progress()
|
||||
end
|
||||
},
|
||||
lualine_y = {'encoding', 'fileformat', 'filetype'},
|
||||
lualine_z = {'location'}
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'location'},
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = {}
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'auto',
|
||||
component_separators = { left = '', right = '' },
|
||||
section_separators = { left = '', right = '' },
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 200,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
}
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
||||
lualine_c = { 'filename' },
|
||||
lualine_x = {
|
||||
function()
|
||||
return require('lsp-progress').progress()
|
||||
end
|
||||
},
|
||||
lualine_y = { 'encoding', 'fileformat', 'filetype' },
|
||||
lualine_z = { 'location' }
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = { 'filename' },
|
||||
lualine_x = { 'location' },
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = {}
|
||||
}
|
||||
|
||||
@ -1,28 +1,28 @@
|
||||
-- setup must be called before loading the colorscheme
|
||||
-- Default options:
|
||||
require("gruvbox").setup({
|
||||
terminal_colors = true, -- add neovim terminal colors
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
bold = true,
|
||||
italic = {
|
||||
strings = true,
|
||||
emphasis = true,
|
||||
comments = true,
|
||||
operators = false,
|
||||
folds = true,
|
||||
},
|
||||
strikethrough = true,
|
||||
invert_selection = false,
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
invert_intend_guides = false,
|
||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||
contrast = "", -- can be "hard", "soft" or empty string
|
||||
palette_overrides = {},
|
||||
overrides = {},
|
||||
dim_inactive = false,
|
||||
transparent_mode = true,
|
||||
terminal_colors = true, -- add neovim terminal colors
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
bold = true,
|
||||
italic = {
|
||||
strings = true,
|
||||
emphasis = true,
|
||||
comments = true,
|
||||
operators = false,
|
||||
folds = true,
|
||||
},
|
||||
strikethrough = true,
|
||||
invert_selection = false,
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
invert_intend_guides = false,
|
||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||
contrast = "", -- can be "hard", "soft" or empty string
|
||||
palette_overrides = {},
|
||||
overrides = {},
|
||||
dim_inactive = false,
|
||||
transparent_mode = not vim.g.neovide,
|
||||
})
|
||||
|
||||
require('color-scheme')
|
||||
|
||||
@ -19,20 +19,20 @@ format = "[$hostname]($style) in "
|
||||
disabled = true
|
||||
{% end %}
|
||||
|
||||
[custom.stl]
|
||||
description = "time logger"
|
||||
when = "stl stat -f /home/hulthe/.stld" # touch the file, but don't create it
|
||||
command = "cat /home/hulthe/.stld"
|
||||
symbol = "🕑"
|
||||
style = "italic bright-purple"
|
||||
format = "[$symbol ($output )]($style)"
|
||||
#[custom.stl]
|
||||
#description = "time logger"
|
||||
#when = "stl stat -f /home/hulthe/.stld" # touch the file, but don't create it
|
||||
#command = "cat /home/hulthe/.stld"
|
||||
#symbol = "🕑"
|
||||
#style = "italic bright-purple"
|
||||
#format = "[$symbol ($output )]($style)"
|
||||
{% if demo %}
|
||||
disabled = true
|
||||
#disabled = true
|
||||
{% end %}
|
||||
|
||||
|
||||
# hide all persondata while in demo mode
|
||||
{% if demo %}
|
||||
# hide all persondata while in demo mode
|
||||
[directory]
|
||||
truncation_length = 1
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{% if hostname == "sputnik" %}
|
||||
lock '$HOME/.local/bin/screenlock-video'
|
||||
lock '$HOME/.local/bin/screenlock'
|
||||
{% else %}
|
||||
lock '$HOME/.local/bin/screenlock'
|
||||
{% end %}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "/etc/xdg/swaync/configSchema.json",
|
||||
"positionX": "left",
|
||||
"positionY": "bottom",
|
||||
"positionX": "right",
|
||||
"positionY": "top",
|
||||
"control-center-margin-top": 10,
|
||||
"control-center-margin-bottom": 10,
|
||||
"control-center-margin-left": 10,
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
border: 2px solid @noti-border-color;
|
||||
border-radius: 12px;
|
||||
margin: 6px 8px 0px 0px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.notification-content {
|
||||
|
||||
44
tree/.face
Normal file
44
tree/.face
Normal file
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="120"
|
||||
height="120"
|
||||
viewBox="0 0 31.75 31.75"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
style="display:inline">
|
||||
<path
|
||||
style="fill:#ffffff;stroke-width:0.177246"
|
||||
d="m 13.134179,31.651166 c -1.367874,-0.18043 -3.4872278,-0.85238 -4.780367,-1.51563 -1.871747,-0.96002 -4.179215,-3.22966 -5.0074297,-4.92534 -1.5914865,-3.25839 -1.6801158,-7.72336 -0.2278948,-11.48085 1.0247424,-2.65144 2.7098602,-4.5706201 5.4768881,-6.2376401 4.4640374,-2.6894 6.9208324,-4.59636 8.5218534,-6.61464 0.435944,-0.54955 0.851411,-0.9404 0.923263,-0.86855 0.34663,0.34663 0.709996,2.45556 0.596276,3.46071 l -0.118698,1.04918 0.543199,-0.3868 c 0.298763,-0.21273 0.754695,-0.66407 1.013185,-1.00297 0.258491,-0.3389 0.531184,-0.55268 0.605988,-0.47507 0.277608,0.28804 0.872923,2.3693 0.872923,3.05181 0,0.78189 -0.07309,0.70941 2.140938,2.12277 3.360595,2.14527 5.28622,5.2741001 5.845846,9.4985401 0.238089,1.79727 0.119928,4.12317 -0.289284,5.69424 -0.438918,1.68512 -1.295306,3.20011 -2.596637,4.59356 -2.715779,2.90803 -6.119638,4.1954 -10.928887,4.13338 -1.132683,-0.0146 -2.298705,-0.0581 -2.591161,-0.0967 z m 5.683631,-1.1265 c 5.074026,-0.89873 8.492767,-3.70496 9.49005,-7.7898 0.358508,-1.46844 0.317005,-5.28368 -0.07569,-6.95754 -0.594746,-2.53514 -2.005266,-4.78931 -3.64922,-5.8318801 -1.428352,-0.90583 -1.561881,-0.82384 -2.840659,1.7442101 -0.615739,1.23654 -1.777129,3.21756 -2.580868,4.40229 l -1.461342,2.15404 0.927607,0.3153 c 1.188141,0.40386 2.476979,1.20634 2.848748,1.77373 0.272049,0.4152 0.269021,0.4806 -0.04735,1.02231 -0.778356,1.33273 -2.272203,1.79512 -5.849412,1.81056 l -2.340153,0.0101 -2.489801,2.46697 c -2.6276133,2.60352 -2.8788341,3.03045 -2.0880964,3.54856 1.8126654,1.18771 7.0732674,1.8772 10.1561944,1.33115 z m 3.183004,-13.17071 c -0.205126,-0.14999 -0.329285,-0.4602 -0.329285,-0.8227 0,-0.96498 1.087198,-1.43355 1.715448,-0.73934 0.872429,0.96402 -0.338235,2.3283 -1.386163,1.56204 z m -3.186586,4.78402 c 1.133944,-0.30198 1.619925,-0.56299 1.85054,-0.9939 0.246861,-0.46126 -0.269147,-0.94676 -1.770094,-1.66543 -1.062457,-0.50872 -1.296906,-0.55176 -3.013183,-0.55311 -1.794444,-0.001 -1.910137,0.0225 -3.231141,0.66815 -1.860639,0.90936 -2.118197,1.48499 -0.948717,2.12031 1.182601,0.64245 5.357705,0.89133 7.112595,0.42398 z m -5.26747,-0.96936 c -1.113796,-0.13246 -1.303724,-0.23853 -1.149022,-0.64168 0.08921,-0.23246 0.582443,-0.27351 3.286452,-0.27351 1.749822,0 3.307658,0.0484 3.461858,0.10758 0.350902,0.13466 0.365077,0.53097 0.02367,0.66198 -0.432127,0.16582 -4.555272,0.2726 -5.622968,0.14563 z m -3.7845902,-3.81466 c 0.7343882,-0.537 0.2478022,-1.88618 -0.6802563,-1.88618 -0.5030742,0 -0.9992445,0.51278 -0.9992445,1.03268 0,0.90987 0.9453857,1.39029 1.6795008,0.8535 z"
|
||||
id="path865" />
|
||||
<path
|
||||
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 7.5967544,-6.2400058 c 0,0 -0.041418,0.1031026 -0.02862,0.2093299 0.012798,0.1062273 0.084435,0.1741091 0.084435,0.1741091 l -0.083147,0.088222 c 0,0 -0.1053512,-0.138166 -0.073877,-0.2774823 0.031474,-0.1393166 0.1012092,-0.1941783 0.101209,-0.1941787 z"
|
||||
id="path1039" />
|
||||
</g>
|
||||
<g
|
||||
id="layer2"
|
||||
style="display:none" />
|
||||
<g
|
||||
id="layer3"
|
||||
style="display:none" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
@ -12,7 +12,7 @@
|
||||
rebase = true
|
||||
|
||||
[core]
|
||||
editor = nvim
|
||||
editor = helix
|
||||
|
||||
[init]
|
||||
defaultBranch = master
|
||||
|
||||
@ -30,6 +30,7 @@ sudo pacman --needed -S \
|
||||
i2c-tools \
|
||||
lazygit \
|
||||
luarocks \
|
||||
man-db man-pages \
|
||||
neovim \
|
||||
nerd-fonts \
|
||||
niri \
|
||||
@ -39,6 +40,7 @@ sudo pacman --needed -S \
|
||||
nushell \
|
||||
openbsd-netcat \
|
||||
pamixer \
|
||||
qt5ct \
|
||||
qt5-wayland \
|
||||
qt6-wayland \
|
||||
ripgrep \
|
||||
|
||||
@ -5,7 +5,7 @@ set -x
|
||||
notify-send "Connecting to Högtalare"
|
||||
|
||||
bluetoothctl power on
|
||||
if bluetoothctl connect 04:FE:A1:71:4C:70; then
|
||||
if bluetoothctl connect E8:26:CF:33:2D:BA; then
|
||||
notify-send "Connected"
|
||||
else
|
||||
notify-send "Failed to connect to Högtalare"
|
||||
|
||||
@ -9,4 +9,4 @@ if ps -e | grep " $LOCKPROG\$"
|
||||
exit 1
|
||||
end
|
||||
|
||||
$LOCKPROG $argv
|
||||
ba $LOCKPROG $argv
|
||||
|
||||
23
tree/.local/nu/macos.nu
Normal file
23
tree/.local/nu/macos.nu
Normal file
@ -0,0 +1,23 @@
|
||||
# Utility commands for macos
|
||||
|
||||
def "net route 4" [
|
||||
] {
|
||||
netstat -rnl -f inet | tail +4 | from ssv -m 1 | into int Refs Use Mtu
|
||||
}
|
||||
|
||||
def "net route 6" [
|
||||
] {
|
||||
netstat -rnl -f inet6 | tail +4 | from ssv -m 1 | into int Refs Use Mtu
|
||||
}
|
||||
|
||||
def "net fw rule" [
|
||||
--anchor (-a): string
|
||||
] {
|
||||
sudo pfctl -sr -a $anchor | lines
|
||||
}
|
||||
|
||||
def "net fw nat" [
|
||||
--anchor (-a): string
|
||||
] {
|
||||
sudo pfctl -sn -a $anchor | lines
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
# Get a Mullvad api access token from an account number
|
||||
def m-token [
|
||||
def "m token" [
|
||||
account: string # Mullvad account number
|
||||
] {
|
||||
(http post https://api.mullvad.net/auth/v1/token
|
||||
@ -8,7 +8,7 @@ def m-token [
|
||||
}
|
||||
|
||||
# Add a device to a mullvad account
|
||||
def m-add-device [
|
||||
def "m add device" [
|
||||
account: string # Mullvad account number
|
||||
] {
|
||||
let token = (m-token $account)
|
||||
@ -23,3 +23,258 @@ def m-add-device [
|
||||
kind: "App",
|
||||
})
|
||||
}
|
||||
|
||||
# Get mullvad-daemon system path
|
||||
def "m daemon path" []: nothing -> string {
|
||||
match (uname).kernel-name {
|
||||
Linux => "/usr/bin/mullvad-daemon",
|
||||
Darwin => "/Applications/Mullvad VPN.app/Contents/Resources/mullvad-daemon",
|
||||
_ => (panic "Unknown Kernel"),
|
||||
}
|
||||
}
|
||||
|
||||
# Return true if mullvad-daemon is running
|
||||
def "m daemon is-running" [
|
||||
# Only return true if mullvad-daemon is running as a launch daemon
|
||||
--system (-s),
|
||||
] {
|
||||
let procs = (^ps aux | lines)
|
||||
if $system {
|
||||
$procs | any { |line| $line =~ (m daemon path) }
|
||||
} else {
|
||||
$procs | any { |line| $line =~ "mullvad-daemon" }
|
||||
}
|
||||
}
|
||||
|
||||
def dns [
|
||||
--server (-s): string,
|
||||
name: string,
|
||||
] {
|
||||
# HACK: turn the optional argument into a list. not sure how to pass it to nslookup otherwise.
|
||||
let server = ([$server] | compact)
|
||||
|
||||
let ipv4 = (dig $name A | lines | skip until {|l| $l =~ "ANSWER SECTION" } | skip 1 | take until { |l| $l == "" } | split column "\t" -c | rename host ttl _ type addr) | reject _
|
||||
let ipv6 = (dig $name AAAA | lines | skip until {|l| $l =~ "ANSWER SECTION" } | skip 1 | take until { |l| $l == "" } | split column "\t" -c | rename host ttl _ type addr) | reject _
|
||||
|
||||
$ipv4 | append $ipv6
|
||||
}
|
||||
|
||||
|
||||
# Build and run mullvad-daemon
|
||||
def "m daemon" [
|
||||
--release (-r)
|
||||
# Force userspace wireguard
|
||||
--userwg
|
||||
# Use wireguard-go over GotaTun
|
||||
--wggo
|
||||
# Use stagemole
|
||||
--stagemole
|
||||
# Attach GDB
|
||||
--gdb
|
||||
# Add counters and such to nft rules
|
||||
--debug-fw
|
||||
] {
|
||||
mut daemon_args = []
|
||||
mut cargo_flags = []
|
||||
mut envs = [
|
||||
MULLVAD_RESOURCE_DIR=./dist-assets/
|
||||
]
|
||||
|
||||
if $release {
|
||||
$cargo_flags ++= [--release]
|
||||
}
|
||||
|
||||
if $stagemole {
|
||||
$cargo_flags ++= [--features api-override]
|
||||
$envs ++= [
|
||||
MULLVAD_API_HOST=api.stagemole.eu
|
||||
MULLVAD_API_ADDR=(dns api.stagemole.eu | where type == A | get 0.addr):443
|
||||
]
|
||||
}
|
||||
|
||||
if $debug_fw {
|
||||
$envs ++= [TALPID_FIREWALL_DEBUG=1]
|
||||
}
|
||||
|
||||
if $userwg {
|
||||
$envs ++= [TALPID_FORCE_USERSPACE_WIREGUARD=1]
|
||||
}
|
||||
|
||||
if $wggo {
|
||||
$cargo_flags ++= [--features wireguard-go]
|
||||
}
|
||||
|
||||
if (m daemon is-running --system) {
|
||||
print "daemon is loaded, stopping..."
|
||||
|
||||
match (uname).kernel-name {
|
||||
Linux => {
|
||||
sudo systemctl stop mullvad-daemon
|
||||
},
|
||||
Darwin => {
|
||||
sudo launchctl unload -w /Library/LaunchDaemons/net.mullvad.daemon.plist
|
||||
},
|
||||
_ => (panic "Unknown Kernel"),
|
||||
}
|
||||
} else if (m daemon is-running) {
|
||||
print "mulvad-daemon is running in another terminal"
|
||||
return
|
||||
}
|
||||
|
||||
if $gdb {
|
||||
$daemon_args ++= [gdb --args]
|
||||
}
|
||||
|
||||
let daemon_path = if $release {
|
||||
$daemon_args ++= [$"($env.CARGO_TARGET_DIR)/release/mullvad-daemon"]
|
||||
} else {
|
||||
$daemon_args ++= [$"($env.CARGO_TARGET_DIR)/debug/mullvad-daemon"]
|
||||
}
|
||||
|
||||
# increase verbosity
|
||||
$daemon_args ++= ["-vv"]
|
||||
|
||||
cargo b ...$cargo_flags
|
||||
sudo ...$envs ...$daemon_args
|
||||
}
|
||||
|
||||
def "m android cli" [
|
||||
...args
|
||||
] {
|
||||
let socket_filename = "rpc-socket"
|
||||
sudo MULLVAD_RPC_SOCKET_PATH=(sudo fd $socket_filename ~/.local/share/waydroid) mullvad ...$args
|
||||
}
|
||||
|
||||
def "m android start" [
|
||||
] {
|
||||
print "starting net.mullvad.mullvadvpn"
|
||||
adb shell am start -n net.mullvad.mullvadvpn/.ui.MainActivity;
|
||||
|
||||
# TODO: the waydroid cli is bork in the nix flake
|
||||
# waydroid app launch net.mullvad.mullvadvpn
|
||||
}
|
||||
|
||||
def "m android stop" [
|
||||
] {
|
||||
let app_pid = (ps | where name =~ mullvadvpn | get -o pid.0)
|
||||
if $app_pid != null {
|
||||
print $"kill net.mullvad.mullvadvpn [($app_pid)]"
|
||||
sudo kill $app_pid
|
||||
} else {
|
||||
print "net.mullvad.mullvadvpn is not running"
|
||||
}
|
||||
}
|
||||
|
||||
def "m android run" [
|
||||
] {
|
||||
print "hack: making sure we're disconnected"
|
||||
do --ignore-errors { m android cli disconnect }
|
||||
|
||||
print "compiling apk"
|
||||
./gradlew installOssProdDebug
|
||||
|
||||
m android start
|
||||
}
|
||||
|
||||
def "m android reload-daemon" [
|
||||
] {
|
||||
let daemon_path = (fd libmullvad_jni.so ~/.local/share/waydroid/ | lines | get -o 0)
|
||||
if $daemon_path == null {
|
||||
print "Can't find libmullvad_jni.so, hot-reload not available. Is the app installed?"
|
||||
exit
|
||||
}
|
||||
|
||||
m android stop
|
||||
|
||||
print "re-compiling libmullvad_jni.so"
|
||||
./gradlew app:cargoBuildX86_64;
|
||||
|
||||
print "Executing hot-swap!"
|
||||
sudo cp ~/.cargo/target/x86_64-linux-android/debug/libmullvad_jni.so $daemon_path;
|
||||
|
||||
m android start
|
||||
}
|
||||
|
||||
|
||||
def "m e2e list" [
|
||||
...args
|
||||
] {
|
||||
print "Building test utils"
|
||||
cargo b --target aarch64-apple-darwin
|
||||
|
||||
let test_manager = $"($env.CARGO_TARGET_DIR)/aarch64-apple-darwin/debug/test-manager"
|
||||
|
||||
print "Listing tests"
|
||||
^$test_manager list-tests ...$args | from tsv | into int priority | sort-by priority name
|
||||
}
|
||||
|
||||
def "m e2e run" [
|
||||
account: string
|
||||
vm: string
|
||||
--skip: list<string>
|
||||
--display (-d)
|
||||
...tests
|
||||
] {
|
||||
let commit = (git rev-parse HEAD | take 6 | decode)
|
||||
print $"Current commit: ($commit)"
|
||||
|
||||
let dist = "../dist"
|
||||
print $"Looking in ($dist)"
|
||||
|
||||
let pkg_ext = match (uname).kernel-name {
|
||||
"Linux" => "rpm", # TODO: rpm
|
||||
"Darwin" => "pkg",
|
||||
_ => (panic "Unknown kernel"),
|
||||
}
|
||||
let target = match (uname).kernel-name {
|
||||
"Linux" => "x86_64-unknown-linux-musl",
|
||||
"Darwin" => "aarch64-apple-darwin",
|
||||
_ => (panic "Unknown kernel"),
|
||||
}
|
||||
|
||||
let pkgs = (ls $dist | where name =~ $".*\\.($pkg_ext)")
|
||||
let pkgs = ($pkgs | where name =~ $commit)
|
||||
|
||||
if ($pkgs | is-empty) {
|
||||
print $"No .($pkg_ext) for current commit found."
|
||||
print "Run ./build.sh"
|
||||
return
|
||||
}
|
||||
|
||||
if ($pkgs | length) > 1 {
|
||||
print $"Multiple .($pkg_ext):s for current commit found."
|
||||
print "Make sure there's only one"
|
||||
print ...$pkgs
|
||||
return
|
||||
}
|
||||
|
||||
let pkg = ($pkgs | get 0.name)
|
||||
|
||||
print $"Using ($pkg)"
|
||||
|
||||
print "Building test utils"
|
||||
|
||||
cargo b --release --target $target -p test-runner -p connection-checker
|
||||
cargo b -p test-manager
|
||||
|
||||
let test_manager = $"($env.CARGO_TARGET_DIR)/debug/test-manager"
|
||||
let bin_dir = $"($env.CARGO_TARGET_DIR)/($target)/release/"
|
||||
|
||||
mut args = [
|
||||
--vm $vm
|
||||
--account $account
|
||||
--app-package $pkg
|
||||
--runner-dir $bin_dir
|
||||
]
|
||||
if $display {
|
||||
$args ++= [--display]
|
||||
}
|
||||
for s in $skip {
|
||||
$args ++= ["--skip" $s]
|
||||
}
|
||||
let args = $args
|
||||
|
||||
print "Running tests"
|
||||
RUST_LOG=debug ^$test_manager run-tests -v ...$args ...$tests
|
||||
}
|
||||
|
||||
|
||||
71
tree/.local/nu/tailscale.nu
Normal file
71
tree/.local/nu/tailscale.nu
Normal file
@ -0,0 +1,71 @@
|
||||
# Get networking info about tailscale peers
|
||||
def "tailscale peer" [
|
||||
hostname?: string
|
||||
get_field?: cell-path
|
||||
]: nothing -> any {
|
||||
let get_field = ($get_field | default ([] | into cell-path))
|
||||
|
||||
let status = (^tailscale status --json | from json)
|
||||
|
||||
let peers = ($status | get Peer)
|
||||
|
||||
if $peers == null {
|
||||
return null
|
||||
}
|
||||
|
||||
let peers = ($peers | transpose key fields | flatten fields)
|
||||
|
||||
let peers = ($peers | each { |peer|
|
||||
let ipv4 = $peer.TailscaleIPs | where { |ip| "." in $ip } | first
|
||||
let ipv6 = $peer.TailscaleIPs | where { |ip| ":" in $ip } | first
|
||||
|
||||
{
|
||||
host: $peer.HostName,
|
||||
ipv4: $ipv4,
|
||||
ipv6: $ipv6,
|
||||
online: $peer.Online,
|
||||
active: $peer.Active,
|
||||
rx: ($peer.RxBytes | into filesize),
|
||||
tx: ($peer.TxBytes | into filesize),
|
||||
dns: ($peer.DNSName),
|
||||
}
|
||||
})
|
||||
|
||||
if $hostname == null {
|
||||
return $peers
|
||||
}
|
||||
|
||||
let peers = ($peers | where host == $hostname)
|
||||
if ($peers | is-empty) {
|
||||
return null
|
||||
}
|
||||
|
||||
$peers | first | get $get_field
|
||||
}
|
||||
|
||||
# SSH to a tailscale peer
|
||||
def "tailscale ssh" [
|
||||
user_hostname: string
|
||||
...ssh_flags: string
|
||||
]: nothing -> any {
|
||||
let hostname = ($user_hostname | parse -r "([^@]*@)?(?<hostname>.*)" | get 0.hostname)
|
||||
ssh -o $"HostName (tailscale peer $hostname | get ipv6)" $user_hostname ...$ssh_flags
|
||||
}
|
||||
|
||||
# SCP to a tailscale peer
|
||||
def "tailscale scp" [
|
||||
from: string
|
||||
to: string
|
||||
...ssh_flags: string
|
||||
]: nothing -> any {
|
||||
|
||||
let options = (
|
||||
[$from, $to] |
|
||||
parse -r "([^@]*@)?(?<hostname>.*):(?<path>.*)" |
|
||||
each { |it| $"HostName (tailscale peer $it.hostname | get ipv6)" } |
|
||||
each { |option| ["-o", $option] } |
|
||||
flatten
|
||||
)
|
||||
|
||||
scp ...$options $from $to ...$ssh_flags
|
||||
}
|
||||
Reference in New Issue
Block a user