nixos adjustments (PATHs mostly)

This commit is contained in:
Daniel Lundin 2024-06-28 07:55:21 +02:00
parent d22ce20dcf
commit 6a5196b4d4
7 changed files with 179 additions and 190 deletions

View file

@ -20,7 +20,7 @@ function fish_prompt
printf "\n\e[1;32m%%\e[0m "
end
else
/usr/bin/starship prompt --terminal-width="$COLUMNS" --status=$STARSHIP_CMD_STATUS --pipestatus="$STARSHIP_CMD_PIPESTATUS" --keymap=$STARSHIP_KEYMAP --cmd-duration=$STARSHIP_DURATION --jobs=$STARSHIP_JOBS
starship prompt --terminal-width="$COLUMNS" --status=$STARSHIP_CMD_STATUS --pipestatus="$STARSHIP_CMD_PIPESTATUS" --keymap=$STARSHIP_KEYMAP --cmd-duration=$STARSHIP_DURATION --jobs=$STARSHIP_JOBS
end
end
@ -43,7 +43,7 @@ function fish_right_prompt
printf ""
end
else
/usr/bin/starship prompt --right --terminal-width="$COLUMNS" --status=$STARSHIP_CMD_STATUS --pipestatus="$STARSHIP_CMD_PIPESTATUS" --keymap=$STARSHIP_KEYMAP --cmd-duration=$STARSHIP_DURATION --jobs=$STARSHIP_JOBS
starship prompt --right --terminal-width="$COLUMNS" --status=$STARSHIP_CMD_STATUS --pipestatus="$STARSHIP_CMD_PIPESTATUS" --keymap=$STARSHIP_KEYMAP --cmd-duration=$STARSHIP_DURATION --jobs=$STARSHIP_JOBS
end
end

View file

@ -1,4 +1,3 @@
#!/usr/bin/fish
# SPDX-License-Identifier: CC0-1.0
if status --is-interactive
set _fishprompt_aid "fish"$fish_pid

View file

@ -4,11 +4,6 @@ set fish_emoji_width 2
fish_add_path $HOME/.cargo/bin
fish_add_path $HOME/bin
## Nix
set -gx LOCALE_ARCHIVE /usr/lib/locale/locale-archive
set -gx NIX_REMOTE daemon
fish_add_path $HOME/.nix-profile/bin
if status is-interactive
## Pager
@ -29,16 +24,10 @@ if status is-interactive
set -gx VISUAL $EDITOR
set -gx SUDO_EDITOR $EDITOR
function tree
eza --tree --color=always $argv | bat --wrap=never
end
function rg --wraps rg --description 'ripgrep with bat'
/usr/bin/rg --color=always $argv | bat --wrap=never
end
## Directory jumping with frecency
function fre_after_cd --on-variable PWD

View file

@ -44,5 +44,5 @@ SETUVAR fish_pager_color_selected_background:\x2dr
SETUVAR fish_pager_color_selected_completion:\x1d
SETUVAR fish_pager_color_selected_description:\x1d
SETUVAR fish_pager_color_selected_prefix:\x1d
SETUVAR fish_user_paths:/home/dln/\x2ekrew/bin\x1e/home/dln/bin\x1e/home/dln/\x2ecargo/bin
SETUVAR fish_user_paths:/home/dln/\x2enix\x2dprofile/bin\x1e/home/dln/\x2ekrew/bin\x1e/home/dln/bin\x1e/home/dln/\x2ecargo/bin
SETUVAR --export theme:Catppuccin\x20Latte

View file

@ -12,7 +12,7 @@ local nvim_args = { "nvim", "--listen", os.getenv("XDG_RUNTIME_DIR") .. "/nvim-p
config.exec_domains = {
wezterm.exec_domain("dev", function(cmd)
local wrapped = { "/usr/bin/ssh", "-t", "dev" }
local wrapped = { "ssh", "-t", "dev" }
for _, arg in ipairs(cmd.args or { os.getenv("SHELL") }) do
table.insert(wrapped, arg)
end
@ -20,7 +20,7 @@ config.exec_domains = {
return cmd
end),
wezterm.exec_domain("nemo", function(cmd)
local wrapped = { "/usr/bin/ssh", "-t", "nemo" }
local wrapped = { "ssh", "-t", "nemo" }
for _, arg in ipairs(cmd.args or { os.getenv("SHELL") }) do
table.insert(wrapped, arg)
end

View file

@ -18,6 +18,7 @@ fi
fre --store_name "edit-history" --add "$_file"
rm -f "$XDG_RUNTIME_DIR/nvim-persistent.sock"
nvim --server "$XDG_RUNTIME_DIR/nvim-persistent.sock" --remote "$_file" &>/dev/null
# Wezterm: switch tab to nvim

View file

@ -2,7 +2,7 @@
set -e
# Use local xdg-open if not in an ssh session
[ -n "$SSH_TTY" ] || exec /usr/bin/xdg-open "$@"
[ -n "$SSH_TTY" ] || exec xdg-open "$@"
if [ -p /dev/stdin ]; then
exec nc -U "$XDG_RUNTIME_DIR/opener.sock" </dev/stdin