fixes issue after update

This commit is contained in:
Dennis Schoepf 2025-11-24 01:39:41 +01:00
parent 057f19290d
commit 60adc2eb2d
4 changed files with 13 additions and 194 deletions

182
:w
View file

@ -1,182 +0,0 @@
{ config, pkgs, ... }:
{
programs.fish = {
enable = true;
functions = {
dbui = ''
nvim +"DBUI"
'';
ff = ''
bash ${./ff.bash}
'';
envsource = ''
for line in (cat $argv | grep -v '^#')
set item (string split -m 1 '=' $line)
set -gx $item[1] $item[2]
end
'';
fish_greeting = "fortune -a";
resize_images = /* fish */ ''
# Resize all JPG images in the current directory and its subdirectories
# Usage: resize_images [percentage]
# Example: resize_images 20 - resizes all images to 20% of original size
# If no percentage is provided, defaults to 40%
set -l percentage $argv[1]
if test -z "$percentage"
set percentage 40
end
for img in (find . -type f -name "*.JPG")
set original_size (stat -f %z "$img")
magick convert "$img" -resize "$percentage%" "$img"
set new_size (stat -f %z "$img")
echo "Processed $img"
echo "Original size: $original_size bytes"
echo "New size: $new_size bytes"
echo "---"
end
'';
localip = "ifconfig | grep \"inet \" | grep -v 127.0.0.1 | awk '{print $2}' | head -n 1";
publicip = "curl -4 ifconfig.me";
fzf = ''
set -Ux FZF_DEFAULT_OPTS "
--color=fg:#ffffff,bg:#0d0e1c,hl:#ef8386
--color=fg+:#ffffff,bg+:#1d2235,hl+:#ef8386
--color=border:#61647a,header:#88ca9f,gutter:#0d0e1c
--color=spinner:#fec43f,info:#00bcff
--color=pointer:#feacd0,marker:#ff5f59,prompt:#9ac8e0"
command fzf
'';
nn = ''
# Require a title argument
if test (count $argv) -lt 1
echo "Usage: nn \"My Note\""
return 1
end
# Join all arguments into single title (preserves spaces inside quotes)
set -l title $argv[1]
# Timestamp up to minutes, format: YYYY-MM-DD_HH-MM
set -l ts (date "+%Y%m%d%H%M")
# Normalize title: lowercase, replace spaces with hyphens, remove/replace
# characters unsafe for filenames (keep a-z0-9- and replace others with -)
set -l slug (string lower -- $title)
# Replace any sequence of non-alphanumeric characters with single hyphen
set -l slug (echo $slug | sed -E 's/[^a-z0-9]+/-/g' | sed -E 's/^-|-$//g')
# Compose filename
set -l filename "$ts"_"$slug.md"
# Directory for notes (change if you prefer another path)
set -l notes_dir ~/notes
# Ensure directory exists
test -d $notes_dir; or mkdir -p $notes_dir
# Full path
set -l fullpath "$notes_dir/$filename"
# If file doesn't exist, create with timestamp and title at top
if not test -f $fullpath
# Human-friendly timestamp line (no seconds)
set -l display_ts (date "+%Y-%m-%d %H:%M")
printf "---\nCREATED_AT: %s\n---\n\n# %s\n\n" "$display_ts" "$title" > $fullpath
end
# Open file in neovim
nvim $fullpath
'';
fish_mode_prompt = ''
switch $fish_bind_mode
case default
set_color --bold brcyan
echo '[N] '
case insert
set_color --bold brgreen
echo '[I] '
case replace_one
set_color --bold yellow
echo '[R] '
case replace
set_color --bold bryellow
echo '[R] '
case visual
set_color --bold brmagenta
echo '[V] '
case '*'
set_color --bold red
echo '[?] '
end
set_color normal
'';
};
interactiveShellInit = ''
set hn (prompt_hostname)
set fish_cursor_default block blink
fish_vi_key_bindings insert
# Custom Colorscheme
set --universal fish_color_autosuggestion brblack # autosuggestions
set --universal fish_color_command brwhite # commands
set --universal fish_color_comment brblack # code comments
set --universal fish_color_cwd brblack # current working directory in the default prompt
set --universal fish_color_end brblack # process separators like ';' and '&'
set --universal fish_color_error brwhite # highlight potential errors
set --universal fish_color_escape brblack # highlight character escapes like '\n' and '\x70'
set --universal fish_color_match yellow # highlight matching parenthesis
set --universal fish_color_normal brwhite # default color
set --universal fish_color_operator brblack # parameter expansion operators like '*' and '~'
set --universal fish_color_param bryellow # regular command parameters
set --universal fish_color_quote brmagenta # quoted blocks of text
set --universal fish_color_redirection brwhite # IO redirections
set --universal fish_color_search --bold --background=black --foreground=bryellow
set --universal fish_color_search_match --background black # highlight history search matches and the selected pager item (must be a background)
set --universal fish_pager_color_selected_background --background black --foreground brmagenta
set --universal fish_pager_color_progress --foreground=brwhite --background=black
set --universal fish_color_selection --background magenta # when selecting text (in vi visual mode)
set --universal fish_color_cancel brblack # the '^C' indicator on a canceled command
set --universal fish_color_host brwhite # current host system in some of fish default prompts
set --universal fish_color_host_remote yellow #ayu:syntax.constant current host system in some of fish default prompts, if fish is running remotely (via ssh or similar)
set --universal fish_color_user brwhite # current username in some of fish default prompts
set -x GPG_TTY (tty)
fish_add_path /run/wrappers/bin
fish_add_path /run/current-system/sw/bin
switch (uname)
case Darwin
fish_add_path /opt/homebrew/bin
if test -d (brew --prefix)"/share/fish/completions"
set -p fish_complete_path (brew --prefix)/share/fish/completions
end
if test -d (brew --prefix)"/share/fish/vendor_completions.d"
set -p fish_complete_path (brew --prefix)/share/fish/vendor_completions.d
end
end
envsource ~/.env
zoxide init fish | source
direnv hook fish | source
fnm env --use-on-cd --shell fish | source
# Temporary fix because of https://github.com/atuinsh/atuin/issues/2803
# atuin init fish | sed 's/-k up/up/' | source
'';
shellAbbrs = {
lg = "nvim +Neogit";
gg = "nvim +Neogit";
g = "git";
frc = "source ~/.config/fish/**/*.fish";
};
};
}

19
flake.lock generated
View file

@ -88,11 +88,11 @@
]
},
"locked": {
"lastModified": 1763906693,
"narHash": "sha256-inm7paa3myo8gE4TzjM8OPvsEg8xocWreIZBgBPEKgo=",
"lastModified": 1762721397,
"narHash": "sha256-E428EuouA4nFTNlLuqlL4lVR78X+EbBIqDqsBFnB79w=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3d6c1c8fa0bea3a1a7ba23d6fa5993116766073b",
"rev": "b8645b18b0f5374127bbade6de7381ef0b3d5720",
"type": "github"
},
"original": {
@ -126,11 +126,11 @@
]
},
"locked": {
"lastModified": 1763505477,
"narHash": "sha256-nJRd4LY2kT3OELfHqdgWjvToNZ4w+zKCMzS2R6z4sXE=",
"lastModified": 1762627886,
"narHash": "sha256-/QLk1bzmbcqJt9sU43+y/3tHtXhAy0l8Ck0MoO2+evQ=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "3bda9f6b14161becbd07b3c56411f1670e19b9b5",
"rev": "5125a3cd414dc98bbe2c528227aa6b62ee61f733",
"type": "github"
},
"original": {
@ -188,11 +188,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1763806073,
"narHash": "sha256-FHsEKDvfWpzdADWj99z7vBk4D716Ujdyveo5+A048aI=",
"lastModified": 1762482733,
"narHash": "sha256-g/da4FzvckvbiZT075Sb1/YDNDr+tGQgh4N8i5ceYMg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "878e468e02bfabeda08c79250f7ad583037f2227",
"rev": "e1ebeec86b771e9d387dd02d82ffdc77ac753abc",
"type": "github"
},
"original": {
@ -231,3 +231,4 @@
"root": "root",
"version": 7
}

View file

@ -15,8 +15,8 @@ function M.apply_to_config(config)
config.font_size = 15.5
config.window_decorations = "NONE"
config.window_padding = helpers.get_padding(18, 6)
config.window_background_opacity = 0.92
-- config.enable_wayland = false;
config.window_background_opacity = 1
config.enable_wayland = false;
end
end

View file

@ -186,7 +186,7 @@ layout {
// Wallpaper Setup
spawn-at-startup "swaync"
spawn-at-startup "ironbar"
// spawn-at-startup "ironbar"
spawn-at-startup "swww-daemon" // Wallpaper
spawn-sh-at-startup "~/.config/awww/bin/random-bg.sh ~/Pictures/Wallpapers/safe/dark"