mirror of
https://github.com/elkowar/dots-of-war.git
synced 2025-05-16 06:59:35 +00:00
Some laptop changes
This commit is contained in:
parent
43b08d0c58
commit
e58444da98
7 changed files with 142 additions and 39 deletions
|
@ -1,6 +1,6 @@
|
||||||
// vim:set ft=kdl shiftwidth=4 commentstring=//%s:
|
// vim:set ft=kdl shiftwidth=4 commentstring=//%s:
|
||||||
debug {
|
debug {
|
||||||
keep-laptop-panel-on-when-lid-is-closed
|
// keep-laptop-panel-on-when-lid-is-closed
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
|
@ -26,7 +26,7 @@ input {
|
||||||
accel-speed -0.1
|
accel-speed -0.1
|
||||||
}
|
}
|
||||||
trackpoint {
|
trackpoint {
|
||||||
accel-speed -0.1
|
accel-speed -0.4
|
||||||
}
|
}
|
||||||
//warp-mouse-to-focus
|
//warp-mouse-to-focus
|
||||||
focus-follows-mouse max-scroll-amount="20%"
|
focus-follows-mouse max-scroll-amount="20%"
|
||||||
|
|
7
eggs/nushell/config.nu
Normal file
7
eggs/nushell/config.nu
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
$env.config = {
|
||||||
|
buffer_editor: "nvim",
|
||||||
|
show_banner : false,
|
||||||
|
}
|
||||||
|
|
||||||
|
alias cr = cargo run
|
||||||
|
|
|
@ -1,38 +1,11 @@
|
||||||
# Nushell Environment Config File
|
# Nushell Environment Config File
|
||||||
#
|
#
|
||||||
# version = "0.99.1"
|
# version = "0.99.1"
|
||||||
|
#
|
||||||
|
|
||||||
def create_left_prompt [] {
|
source ($nu.default-config-dir | path join 'zoxide.nu')
|
||||||
let dir = match (do --ignore-shell-errors { $env.PWD | path relative-to $nu.home-path }) {
|
|
||||||
null => $env.PWD
|
|
||||||
'' => '~'
|
|
||||||
$relative_pwd => ([~ $relative_pwd] | path join)
|
|
||||||
}
|
|
||||||
|
|
||||||
let path_color = (if (is-admin) { ansi red_bold } else { ansi green_bold })
|
|
||||||
let separator_color = (if (is-admin) { ansi light_red_bold } else { ansi light_green_bold })
|
|
||||||
let path_segment = $"($path_color)($dir)(ansi reset)"
|
|
||||||
|
|
||||||
$path_segment | str replace --all (char path_sep) $"($separator_color)(char path_sep)($path_color)"
|
|
||||||
}
|
|
||||||
|
|
||||||
def create_right_prompt [] {
|
|
||||||
# create a right prompt in magenta with green separators and am/pm underlined
|
|
||||||
let time_segment = ([
|
|
||||||
(ansi reset)
|
|
||||||
(ansi magenta)
|
|
||||||
(date now | format date '%x %X') # try to respect user's locale
|
|
||||||
] | str join | str replace --regex --all "([/:])" $"(ansi green)${1}(ansi magenta)" |
|
|
||||||
str replace --regex --all "([AP]M)" $"(ansi magenta_underline)${1}")
|
|
||||||
|
|
||||||
let last_exit_code = if ($env.LAST_EXIT_CODE != 0) {([
|
|
||||||
(ansi rb)
|
|
||||||
($env.LAST_EXIT_CODE)
|
|
||||||
] | str join)
|
|
||||||
} else { "" }
|
|
||||||
|
|
||||||
([$last_exit_code, (char space), $time_segment] | str join)
|
|
||||||
}
|
|
||||||
|
|
||||||
# Use nushell functions to define your right and left prompt
|
# Use nushell functions to define your right and left prompt
|
||||||
$env.PROMPT_COMMAND = {|| create_left_prompt }
|
$env.PROMPT_COMMAND = {|| create_left_prompt }
|
||||||
|
@ -97,5 +70,5 @@ $env.NU_PLUGIN_DIRS = [
|
||||||
# path add ($env.HOME | path join ".local" "bin")
|
# path add ($env.HOME | path join ".local" "bin")
|
||||||
# $env.PATH = ($env.PATH | uniq)
|
# $env.PATH = ($env.PATH | uniq)
|
||||||
|
|
||||||
# To load from a custom file you can use:
|
mkdir ($nu.data-dir | path join "vendor/autoload")
|
||||||
# source ($nu.default-config-dir | path join 'custom.nu')
|
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")
|
||||||
|
|
60
eggs/nushell/zoxide.nu
Normal file
60
eggs/nushell/zoxide.nu
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
# Code generated by zoxide. DO NOT EDIT.
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
#
|
||||||
|
# Hook configuration for zoxide.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Initialize hook to add new entries to the database.
|
||||||
|
if (not ($env | default false __zoxide_hooked | get __zoxide_hooked)) {
|
||||||
|
$env.__zoxide_hooked = true
|
||||||
|
$env.config = ($env | default {} config).config
|
||||||
|
$env.config = ($env.config | default {} hooks)
|
||||||
|
$env.config = ($env.config | update hooks ($env.config.hooks | default {} env_change))
|
||||||
|
$env.config = ($env.config | update hooks.env_change ($env.config.hooks.env_change | default [] PWD))
|
||||||
|
$env.config = ($env.config | update hooks.env_change.PWD ($env.config.hooks.env_change.PWD | append {|_, 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 __zoxide_z [...rest:string] {
|
||||||
|
let arg0 = ($rest | append '~').0
|
||||||
|
let path = if (($rest | length) <= 1) and ($arg0 == '-' or ($arg0 | path expand | path type) == dir) {
|
||||||
|
$arg0
|
||||||
|
} else {
|
||||||
|
(zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n")
|
||||||
|
}
|
||||||
|
cd $path
|
||||||
|
}
|
||||||
|
|
||||||
|
# Jump to a directory using interactive search.
|
||||||
|
def --env __zoxide_zi [...rest:string] {
|
||||||
|
cd $'(zoxide query --interactive -- ...$rest | str trim -r -c "\n")'
|
||||||
|
}
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
#
|
||||||
|
# Commands for zoxide. Disable these using --no-cmd.
|
||||||
|
#
|
||||||
|
|
||||||
|
alias z = __zoxide_z
|
||||||
|
alias zi = __zoxide_zi
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
#
|
||||||
|
# Add this to your env file (find it by running `$nu.env-path` in Nushell):
|
||||||
|
#
|
||||||
|
# zoxide init nushell | save -f ~/.zoxide.nu
|
||||||
|
#
|
||||||
|
# Now, add this to the end of your config file (find it by running
|
||||||
|
# `$nu.config-path` in Nushell):
|
||||||
|
#
|
||||||
|
# source ~/.zoxide.nu
|
||||||
|
#
|
||||||
|
# Note: zoxide only supports Nushell v0.89.0+.
|
|
@ -7,6 +7,7 @@
|
||||||
"lazyvim.plugins.extras.editor.telescope",
|
"lazyvim.plugins.extras.editor.telescope",
|
||||||
"lazyvim.plugins.extras.lang.json",
|
"lazyvim.plugins.extras.lang.json",
|
||||||
"lazyvim.plugins.extras.lang.markdown",
|
"lazyvim.plugins.extras.lang.markdown",
|
||||||
|
"lazyvim.plugins.extras.lang.nushell",
|
||||||
"lazyvim.plugins.extras.lang.rust",
|
"lazyvim.plugins.extras.lang.rust",
|
||||||
"lazyvim.plugins.extras.lang.toml",
|
"lazyvim.plugins.extras.lang.toml",
|
||||||
"lazyvim.plugins.extras.util.mini-hipatterns"
|
"lazyvim.plugins.extras.util.mini-hipatterns"
|
||||||
|
|
|
@ -22,6 +22,64 @@
|
||||||
// "always_treat_brackets_as_autoclosed": false,
|
// "always_treat_brackets_as_autoclosed": false,
|
||||||
// "unstable.ui_density": "compact",
|
// "unstable.ui_density": "compact",
|
||||||
"assistant": {
|
"assistant": {
|
||||||
|
"always_allow_tool_actions": true,
|
||||||
|
"default_profile": "code",
|
||||||
|
"profiles": {
|
||||||
|
"code": {
|
||||||
|
"name": "Code",
|
||||||
|
"tools": {
|
||||||
|
"rename": false,
|
||||||
|
"thinking": true,
|
||||||
|
"terminal": true,
|
||||||
|
"symbol_info": true,
|
||||||
|
"read_file": true,
|
||||||
|
"open": true,
|
||||||
|
"now": true,
|
||||||
|
"list_directory": true,
|
||||||
|
"grep": true,
|
||||||
|
"find_path": true,
|
||||||
|
"fetch": true,
|
||||||
|
"edit_file": true,
|
||||||
|
"diagnostics": true,
|
||||||
|
"create_file": true,
|
||||||
|
"contents": true,
|
||||||
|
"code_symbols": true,
|
||||||
|
"code_actions": true,
|
||||||
|
"batch_tool": true
|
||||||
|
},
|
||||||
|
"enable_all_context_servers": false,
|
||||||
|
"context_servers": {}
|
||||||
|
},
|
||||||
|
"write": {
|
||||||
|
"name": "Write",
|
||||||
|
"tools": {
|
||||||
|
"open": true,
|
||||||
|
"batch_tool": true,
|
||||||
|
"code_actions": true,
|
||||||
|
"code_symbols": true,
|
||||||
|
"contents": false,
|
||||||
|
"copy_path": false,
|
||||||
|
"create_file": true,
|
||||||
|
"delete_path": false,
|
||||||
|
"diagnostics": true,
|
||||||
|
"edit_file": true,
|
||||||
|
"fetch": true,
|
||||||
|
"list_directory": true,
|
||||||
|
"move_path": false,
|
||||||
|
"now": true,
|
||||||
|
"find_path": true,
|
||||||
|
"read_file": true,
|
||||||
|
"grep": true,
|
||||||
|
"rename": false,
|
||||||
|
"symbol_info": true,
|
||||||
|
"terminal": true,
|
||||||
|
"thinking": true,
|
||||||
|
"web_search": true
|
||||||
|
},
|
||||||
|
"enable_all_context_servers": true,
|
||||||
|
"context_servers": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
"default_model": {
|
"default_model": {
|
||||||
"provider": "copilot_chat",
|
"provider": "copilot_chat",
|
||||||
"model": "claude-3-7-sonnet"
|
"model": "claude-3-7-sonnet"
|
||||||
|
|
|
@ -10,12 +10,6 @@ setopt SHARE_HISTORY
|
||||||
|
|
||||||
source "$ZDOTDIR/utils.zsh"
|
source "$ZDOTDIR/utils.zsh"
|
||||||
|
|
||||||
if [ "$(hostname)" = "crabbix" ]; then
|
|
||||||
if command -v nu; then
|
|
||||||
exec nu
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if [ ! -f "$HISTFILE" ]; then
|
if [ ! -f "$HISTFILE" ]; then
|
||||||
mkdir -p "$(dirname "$HISTFILE")"
|
mkdir -p "$(dirname "$HISTFILE")"
|
||||||
|
@ -164,6 +158,7 @@ export PATH="$HOME/.local/bin:$PATH"
|
||||||
export PATH="$HOME/.bun/bin:$PATH"
|
export PATH="$HOME/.bun/bin:$PATH"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
|
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
|
||||||
if [ -s "$NVM_DIR/nvm.sh" ]; then
|
if [ -s "$NVM_DIR/nvm.sh" ]; then
|
||||||
. "$NVM_DIR/nvm.sh"
|
. "$NVM_DIR/nvm.sh"
|
||||||
|
@ -188,3 +183,12 @@ if [ -f '~/Downloads/google-cloud-sdk/completion.zsh.inc' ]; then . '~/Downloads
|
||||||
|
|
||||||
[[ -f '/Applications/Tailscale.app/Contents/MacOS/Tailscale' ]] && alias tailscale="/Applications/Tailscale.app/Contents/MacOS/Tailscale"
|
[[ -f '/Applications/Tailscale.app/Contents/MacOS/Tailscale' ]] && alias tailscale="/Applications/Tailscale.app/Contents/MacOS/Tailscale"
|
||||||
command -v jless >/dev/null && alias yless="jless --yaml"
|
command -v jless >/dev/null && alias yless="jless --yaml"
|
||||||
|
|
||||||
|
|
||||||
|
## SWITCH TO NU SHELL
|
||||||
|
# if [ "$(hostname)" = "crabbix" ]; then
|
||||||
|
# if command -v nu; then
|
||||||
|
# exec nu
|
||||||
|
# fi
|
||||||
|
# fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue