fish: add theme function

This commit is contained in:
Charles Gould 2025-04-01 10:46:52 -05:00
parent 7b3040cba0
commit 375dfcbf47
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,2 @@
complete -f -c theme -n "not __fish_seen_subcommand_from dark light" -a "dark" -d "Set dark theme"
complete -f -c theme -n "not __fish_seen_subcommand_from dark light" -a "light" -d "Set light theme"

15
fish/functions/theme.fish Normal file
View File

@ -0,0 +1,15 @@
function theme
if test (count $argv) -eq 1
if test "$argv[1]" = "dark"
fish_config theme choose "Catppuccin Frappe"
else if test "$argv[1]" = "light"
fish_config theme choose "Catppuccin Latte"
else
echo "Error: Invalid theme. Use 'dark' or 'light'." >&2
return 1
end
else
echo "Usage: theme [dark|light]" >&2
return 1
end
end