fish: add theme function
This commit is contained in:
parent
7b3040cba0
commit
375dfcbf47
2
fish/completions/theme.fish
Normal file
2
fish/completions/theme.fish
Normal 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
15
fish/functions/theme.fish
Normal 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
|
Loading…
x
Reference in New Issue
Block a user