diff --git a/fish/completions/theme.fish b/fish/completions/theme.fish new file mode 100644 index 0000000..f83a6f0 --- /dev/null +++ b/fish/completions/theme.fish @@ -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" diff --git a/fish/functions/theme.fish b/fish/functions/theme.fish new file mode 100644 index 0000000..e41c5b4 --- /dev/null +++ b/fish/functions/theme.fish @@ -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